Repository navigation
fix(auth): fail a global or others sign out answered with session_not_found - #2108
Merged
spydon merged 1 commit intoOct 29, 2026
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 23 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
spydon
deleted the
lukasklingsbo/sdk-2600-auth-a-global-or-others-sign-out-answered-403
branch
October 29, 2026 18:27
This file contains hidden or 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
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.
Summary
signOuttreated a403 session_not_foundfrom/logoutas "already signed out" for every scope. That answer only means the current session is gone, while the other sessions of the user can still exist. So:signOut(scope: SignOutScope.global)removed the local session, emittedsignedOutand returned success, although the other sessions were still alive.signOut(scope: SignOutScope.others)returned success without having revoked anything.Following the error table of the proposed sign out spec (supabase/sdk#302):
localglobalothers204403user_not_found403session_not_foundFor
globalthe local session is kept on that failure, so the app can fall back toSignOutScope.localto sign out the device. ThesignOutdartdoc now says so.Tests
sign_out_scope_test.dartgets a group that runs each scope against204,403 user_not_foundand403 session_not_found, checking the local session, the emitted events and, for the failures, the thrown error code. The old global test that expected success onsession_not_foundis replaced, and an others test made redundant by the new group is removed.Fixes SDK-2600