Skip to content

refactor(auth): move the pkce flow and sign-out helpers out of client.py - #2086

Merged
spydon merged 1 commit into
mainfrom
lukasklingsbo/sdk-3089-auth-move-the-pkce-flow-and-sign-out
Nov 16, 2026
Merged

spydon merged 1 commit into
mainfrom
lukasklingsbo/sdk-3089-auth-move-the-pkce-flow-and-sign-out

Conversation

@spydon

@spydon spydon commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

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.

SDK-3089

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

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

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.

Share

Recent review info

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: 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.

@spydon
spydon force-pushed the lukasklingsbo/sdk-3089-auth-move-the-pkce-flow-and-sign-out branch from f3b16fb to b03ffbd Compare November 16, 2026 15:29
@spydon
spydon merged commit 1cc02e0 into main Nov 16, 2026
26 checks passed
@spydon
spydon deleted the lukasklingsbo/sdk-3089-auth-move-the-pkce-flow-and-sign-out branch November 16, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant