-
Notifications
You must be signed in to change notification settings - Fork 290
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Checklist
- The issue can be reproduced in the auth0-react sample app (or N/A).
- I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
When switching between different auth0 users within the same browser, the user from useAuth0() will return undefined and the isAuthenticated will return false, even after the user has successfully authenticated with the loginWithRedirect function. This occurs when using the cacheLocation is set to memory
Reproduction
- Setup an auth0 provider with cacheLocation='memory' useRefreshTokens={true} and useRefreshTokensFallback={true}
- Use a chrome or microsoft edge browser and authenticate a user and switch between several auth0 accounts.
- You should notice that after proceeding through the loginWithRedirect and being directed to the client application that intermittently, the
userwill still be undefined and theisAuthenticatedwill be false.
Additional context
No response
auth0-react version
2.2.0
React version
18.3.1
Which browsers have you tested in?
Chrome, Edge
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working