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

Fix SSR guide to accomodate for expired access tokens (where even the key expired) #876

Open
porcellus opened this issue Dec 2, 2024 · 0 comments

Comments

@porcellus
Copy link
Contributor

The issue is present here: https://supertokens.com/docs/thirdparty/nextjs/app-directory/protecting-route

The solution I recommended (although this should be re-validated):

I think you can resolve this by updating verifyToken to resolve with undefined instead of rejecting with an error in this case. The user is not expected to be logged out btw, they should be able to refresh in this case. (So you should end up in the branch rendering TryRefreshComponent)

For more details see this thread

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

1 participant