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

(with-supertokens example): Fixes infinite redirect issue for unauthorised error during SSR #42634

Merged
merged 148 commits into from Nov 8, 2022

Conversation

rishabhpoddar
Copy link
Contributor

If there is an unauthorised error during getServerSideProps, then we return the same response as the try refresh token error so that all cookies are cleared from the frontend due to refreshing failure.

If we did not do this, it would cause an infinite loop if the session was removed in offline mode as the frontend would still think that the session exists, and would redirect back to the protected route which would fail verification again.

NkxxkN and others added 30 commits February 16, 2021 15:21
Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: Lee Robinson <me@leerob.io>
@ijjk ijjk added the examples Issue/PR related to examples label Nov 8, 2022
@ijjk ijjk merged commit 90ddc24 into vercel:canary Nov 8, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants