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
fix(auth): notify password recovery from verify_otp and pkce exchanges - #2057
Apps listening for PASSWORD_RECOVERY to show a "set a new password" screen never saw it on v3.
verify_otp with type="recovery" emits PASSWORD_RECOVERY instead of SIGNED_IN.
exchange_code_for_session emits PASSWORD_RECOVERY when the verifier carries the /PASSWORD_RECOVERY suffix, whether it was stored by reset_password_for_email or passed in explicitly.
Both clients, with unit tests for the OTP types and the PKCE flows.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: b4ed475c-5ff1-4376-ac2f-032e1cb0b43e
Commits
Reviewing files that changed from the base of the PR and between cf38e13 and 70f07b7.
Files selected for processing: 3
src/auth/src/supabase_auth/client.py
src/auth/tests/_async/test_verify_otp.py
src/auth/tests/_sync/test_verify_otp.py
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Bug Fixes
Password recovery flows now emit a PASSWORD_RECOVERY auth-state notification, while other code-exchange and OTP verification flows emit SIGNED_IN.
Auth-state notifications now include the updated session, keeping the reported state consistent with the session returned and stored after verification.
Async and sync PKCE code exchanges and OTP verification now emit PASSWORD_RECOVERY for recovery flows and SIGNED_IN otherwise. Session-saving helpers accept the selected event. Tests cover event order and session consistency for both client types.
Possibly related PRs
supabase/supabase-py#1906: Changes PKCE completion to select PASSWORD_RECOVERY when a stored recovery context is present.
Change: Bug fix
Merge Risk: Minimal · previous review cf38e
This change makes password-recovery flows emit PASSWORD_RECOVERY instead of SIGNED_IN, and other flows are unchanged. No merge-blocking risk was identified, and both the async and sync clients have tests for the new events.
- [ ] 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: 0e1ba847-8aea-482d-b453-cbcafa03c3d7
Commits
Reviewing files that changed from the base of the PR and between 569e6fa and cf38e13.
Files selected for processing: 5
src/auth/src/supabase_auth/client.py
src/auth/tests/_async/test_pkce_code_challenge.py
src/auth/tests/_async/test_verify_otp.py
src/auth/tests/_sync/test_pkce_code_challenge.py
src/auth/tests/_sync/test_verify_otp.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.
Apps listening for
PASSWORD_RECOVERYto show a "set a new password" screen never saw it on v3.verify_otpwithtype="recovery"emitsPASSWORD_RECOVERYinstead ofSIGNED_IN.exchange_code_for_sessionemitsPASSWORD_RECOVERYwhen the verifier carries the/PASSWORD_RECOVERYsuffix, whether it was stored byreset_password_for_emailor passed in explicitly.SDK-2818