Keeping Authentication on page reload
jamby opened this issue ยท 1 comments
jamby commented
So I followed the guide and it's great! ๐
However, I'm at the point where I authenticate on the frontend and get the auth token back from the server (along with email, username, and whatever else I decide).
Now what I want to be able to do, is when I store the authToken
in localStorage
, and I refresh the page, it should know that I'm still logged in without me having to relog in.
Was wondering how we would do that? Thanks!
hggeorgiev commented
Hello @jamby,
This is usually done by front-end applications. I suppose RoR applications could do it too, but you should research how to keep a session.
I'm closing this as it's not directly related to the tutorial.