-
-
Notifications
You must be signed in to change notification settings - Fork 167
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: return error early for redirects #992
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kangmingtay
force-pushed
the
km/fix-identity-linking-error
branch
from
December 12, 2024 08:04
ab7630f
to
59df040
Compare
J0
approved these changes
Dec 12, 2024
@kangmingtay just wanted to make sure you are aware this change causes the JWT to be nuked from local storage every time the client is loaded (when there is no session in the URL). |
hf
added a commit
that referenced
this pull request
Dec 13, 2024
hf
pushed a commit
that referenced
this pull request
Dec 13, 2024
🤖 I have created a release *beep* *boop* --- ## [2.67.1](v2.67.0...v2.67.1) (2024-12-13) ### Bug Fixes * revert [#992](#992) and [#993](#993) ([#999](#999)) ([12b2848](12b2848)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
kangmingtay
added a commit
that referenced
this pull request
Dec 16, 2024
kangmingtay
added a commit
that referenced
this pull request
Dec 17, 2024
## What kind of change does this PR introduce? * Fixes the bug introduced previously in https://github.com/supabase/auth-js/pull/993/files#diff-3522461172efd6058d6b8da62fc2d30d8b524d2b64894ea2c67218c52f7fdff5R310, where it attempted to always try to find a session in the URL, which led to users being logged out on a page refresh * This PR also reverts the previous PR #992, which returns the error early if there's a redirect, since some redirect errors (like identity linking) should not result in the existing session being removed. * Tested the following scenarios: * Sign in and refresh the page * Sign in and attempt to link an already existing identity * Sign in and attempt to link a new identity
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
getSessionFromUrl
ends up returningNot a valid PKCE flow url.
instead of the actual error