-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Auth0 refresh tokens #104
Comments
The author of the parent remix-auth framework has said that ensuring that access tokens are current is outside the scope of the framework (sergiodxa/remix-auth-oauth2#37), so I do not expect this to be something that is implemented within the framework itself. That being said, it isn't too hard to do yourself. You can implement a subclass of the Auth0Strategy that handles this. Make sure that you are taking security precautions around the handling of refresh tokens, since it is important to avoid them being compromised and detecting if that has happened (e.g., https://auth0.com/docs/secure/tokens/refresh-tokens). The code will look something like this:
|
Describe the bug
If you enable refresh tokens and your token expires isAuthenticated returns true and authenticate doesn't re-authenticate (or use the refresh token to) I can't seem to find any explicit support for it. Are there any working examples of it? Spotify auth seems to handle it like:
https://github.com/JosteinKringlen/remix-auth-spotify/blob/3987237f49c29047ff27e75225686320c1e08ac7/src/index.ts#L263
Your Example Website or App
Steps to Reproduce the Bug or Issue
Enable refresh tokens
Expected behavior
Tokens should be refreshed automatically
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: