You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
New Features
Added admin sign-out for a session token, with global, local, and other-session scopes. Global sign-out is used by default.
Sign-out succeeds if the requested session or user is already signed out. Access tokens may remain valid until they expire.
Bug Fixes
Improved handling of sign-out errors: invalid scopes are rejected, while other API and server errors are reported.
The admin API now provides sign_out with global, local, and others scopes. It validates the scope and uses shared logout handling, which sends the request and processes already-signed-out responses. Client sign-out also uses this shared handling. Synchronous and asynchronous tests cover request behavior, errors, and refresh attempts after admin sign-out.
Sequence Diagram(s)
sequenceDiagram
participant SupabaseAuthAdmin
participant _logout
participant LogoutEndpoint
SupabaseAuthAdmin->>_logout: JWT and validated scope
_logout->>LogoutEndpoint: POST with scope and bearer token
LogoutEndpoint-->>_logout: Response
_logout-->>SupabaseAuthAdmin: Return success or raise error
Loading
Possibly related PRs
supabase/supabase-py#2080: Defines client sign-out scope and error handling that the new admin method shares.
Change: Feature
Merge Risk: Minimal · up to 22f6f
This adds an admin sign_out method that restores the v2 API and shares logout handling with client sign-out. No actionable merge-blocking risk was identified, and the new tests cover the main scope and error behavior.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 2db04064-1cc2-43f4-9029-b20e42b1c1a2
Commits
Reviewing files that changed from the base of the PR and between 3042be2 and 22f6fe2.
Files selected for processing: 3
src/auth/src/supabase_auth/admin_api.py
src/auth/tests/_async/test_gotrue_admin_api.py
src/auth/tests/_sync/test_gotrue_admin_api.py
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 1 remain after this review.
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
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.
Adds
admin.sign_out(jwt, scope="global")to both admin clients, restoring the v2 API. Closes SDK-2735.POST /logoutwith the user's access token and the scope.sign_out.auth.admin.sign_outas implemented insdk-compliance.yaml.