Repository navigation
fix(auth): restore prior PKCE verifier after failed flow start - #2865
umeraamir69 wants to merge 1 commit into
Conversation
When a PKCE start fails after dual-writing the legacy key, clear only the failed flow slot and restore the previous live verifier so default callbacks without a flow id can still exchange the earlier valid link. Fixes supabase#2863
|
No actionable comments were generated in the recent review. Summary
Change: Bug fix · Severity of issue fixed: Medium Merge Risk:
|
Summary
signInWithOtp) dual-write a new verifier then callremovePKCEVerifier, which previously deleted the legacy<storageKey>-code-verifierkey even when an earlier live flow still had a usable verifier in its slot.AuthPKCECodeVerifierMissingError.Fixes #2863
Test plan
pnpm nx test auth-js -- test/helpers.test.ts test/GoTrueClient.pkce.test.ts --runInBandremovePKCEVerifierrestores legacy key from prior live flowexchangeCodeForSessionsucceeds without a flow idflowType: 'pkce', send magic link, immediately resend within rate limit, open first email link in same browser