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 access token can fail if user session has expired #1391

Open
richardxia opened this issue Aug 4, 2024 · 0 comments
Open

Refreshing access token can fail if user session has expired #1391

richardxia opened this issue Aug 4, 2024 · 0 comments
Assignees

Comments

@richardxia
Copy link
Member

When constructing the app context, we have an explicit check as to whether the authentication access token has expired, and if so, we attempt to refresh it using the Auth0 library in

AuthService.refreshAccessToken(contextValue.authClient)
. However, refreshing the access token can fail if the user's session, as stored in a cookie, has itself expired, which would require the user to authenticate with Auth0 again.

Currently, we do not provide any user-facing indication that authentication has failed, and even worse, the application state may be inconsistent, with other parts of the code assuming that the presence of the authState object implies that the user is authenticated.

A better user experience would be to fully reset the application authentication state, and if the user were on a page that required authentication, redirect them to the login page.

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

No branches or pull requests

2 participants