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
{{ message }}
Repository navigation
refactor(auth): move the pkce flow and sign-out helpers out of client.py - #2086
Moves the free functions and constants at the top of client.py into private modules, so the file starts at SupabaseAuthHttpClient. No public API change.
_pkce.py: PKCE flow ids, code verifier storage format and challenge params, including _stored_code_verifier.
_sign_out.py: sign-out scope and session gone checks.
helpers.py: URL params, JWKS helpers and _verify_otp_event.
Review was skipped as selected files did not have any reviewable changes.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 1771c860-13cb-4359-9c86-18494cb881a2
Commits
Reviewing files that changed from the base of the PR and between f3b16fb and b03ffbd.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Authentication
Improved PKCE sign-in and password-recovery flow handling, including redirect tracking and management of pending flows.
Password-recovery links are now distinguished from standard sign-ins.
Bug Fixes
Sign-out now validates scope values and handles already-ended sessions and expired refresh tokens more consistently.
Invalid flow identifiers are excluded from stored flow indexes.
The change moves PKCE, sign-out, URL parsing, and JWKS helpers out of client.py into dedicated modules or helpers.py. It adds OTP event mapping and helper logic for PKCE flows, sign-out session checks, URL parameters, implicit-grant detection, and JWK lookup. Existing client call sites and tests are updated to import the helpers from their new locations.
Possibly related PRs
supabase/supabase-py#2040: Adds the concurrent PKCE flow implementation that this PR relocates from client.py.
supabase/supabase-py#2080: Adds the sign-out scope and gone-session checks that this PR relocates to _sign_out.py.
Change: Refactor
Merge Risk: Minimal · previous review f3b16
This refactor moves authentication helper functions into dedicated modules without intended behavior changes. No concrete risk was found, so it looks safe to merge after normal checks.
- [ ] 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: 27a85947-41ee-4e7e-b404-8aa0a34ae7a5
Commits
Reviewing files that changed from the base of the PR and between 56af8b0 and f3b16fb.
Files selected for processing: 5
src/auth/src/supabase_auth/_pkce.py
src/auth/src/supabase_auth/_sign_out.py
src/auth/src/supabase_auth/client.py
src/auth/src/supabase_auth/helpers.py
src/auth/tests/test_helpers.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.
Moves the free functions and constants at the top of
client.pyinto private modules, so the file starts atSupabaseAuthHttpClient. No public API change._pkce.py: PKCE flow ids, code verifier storage format and challenge params, including_stored_code_verifier._sign_out.py: sign-out scope and session gone checks.helpers.py: URL params, JWKS helpers and_verify_otp_event.SDK-3089