Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log user out if accessToken is expired #63

Open
jamesvclements opened this issue Jan 12, 2018 · 1 comment
Open

Log user out if accessToken is expired #63

jamesvclements opened this issue Jan 12, 2018 · 1 comment

Comments

@jamesvclements
Copy link
Contributor

The accessToken & user information is saved in the local storage. We know when it expires, we just have to check on initial load and if expired, log the user out.

@jamesvclements
Copy link
Contributor Author

Actually, I think it would be better to only check if it's expired on a request that needs authentication. That way if the user visits and only does non-authenticated activities, they're not forced to log in again.

We could use a middleware around the API requests that checks the status of the token, and logs out if expired. Basically iterating in the ideas expressed here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant