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

Refreshing React SPA browser window, loses existing authenticated state from useAuth(). Can you show example of retaining the state? #10414

Open
inspiraller opened this issue May 8, 2024 · 0 comments

Comments

@inspiraller
Copy link

When loading the react SPA, currently I have to run getAccessTokenSilently() on a poll of a few seconds to constantly check when an accessToken is available again. I also have to do this when refreshing the browser window. I lose all my authenticated state from the useAuth() hook. This is not an ideal solution. Having read about refresh tokens rotation I was wondering if the auth0 handles this internally automatically or whether I need to implement a strategy to retrieve the refresh-token and ultimately authenticated state. Either way, an example would be useful on the quickstart.

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

No branches or pull requests

2 participants
@inspiraller and others