feat(auth): add sign-out reason capability#47
Merged
Conversation
Adds auth.session.sign_out_reason to the canonical matrix so SDKs can declare whether they surface why a user was signed out (user-initiated, session-expired, or session-missing) on the sign-out auth event.
grdsdev
approved these changes
Jun 26, 2026
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.
What
Adds a new canonical capability
auth.session.sign_out_reasonto the matrix, plus a spec atspecs/auth/session/sign_out_reason.md.The capability covers surfacing why a user was signed out on the sign-out auth event, so a listener can distinguish a voluntary sign-out from an involuntary one. The spec defines three SDK-agnostic, distinguishable cases:
Why
This was implemented in supabase-flutter (supabase/supabase-flutter#1453) but is not available in the other SDKs. It is worth tracking as a distinct, first-class capability across all SDKs rather than folding it into
auth.session.subscribe_auth_events, so the matrix reflects parity (or the lack of it) for this specific behavior.Notes
npm run validatepasses and the full vitest suite (136 tests) is green.The Flutter
sdk-compliance.yamlwill be re-pointed fromauth.session.subscribe_auth_eventsto this new id in supabase/supabase-flutter#1453.