Skip to content

fix(gotrue): include code challenge in resend with PKCE flow#1469

Merged
spydon merged 1 commit into
mainfrom
lukasklingsbo/sdk-1023-parityauth-resend-with-pkce-flow-should-include
Jun 25, 2026
Merged

fix(gotrue): include code challenge in resend with PKCE flow#1469
spydon merged 1 commit into
mainfrom
lukasklingsbo/sdk-1023-parityauth-resend-with-pkce-flow-should-include

Conversation

@spydon

@spydon spydon commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What

When resend() is called with an email while the client uses the PKCE flow (the default), the POST /resend request now includes code_challenge and code_challenge_method. Without the code challenge, the resent confirmation link cannot be completed via exchangeCodeForSession.

This brings the Dart SDK to parity with the supabase-js behavior.

Behavior

  • resend(email:) in PKCE flow includes code_challenge + code_challenge_method: s256 in the body.
  • Phone resend is unchanged (no code challenge).
  • Implicit (non-PKCE) flow is unchanged (fields are null).

Tests

Added tests covering all three cases above in otp_mock_test.dart, and captured the resend body in the OTP mock client for assertions.

Closes SDK-1023

https://linear.app/supabase/issue/SDK-1023/parityauth-resend-with-pkce-flow-should-include-code-challenge-in

When resend() is called with an email in the PKCE flow, the request now includes code_challenge and code_challenge_method so the resent confirmation link can be completed. Phone and non-PKCE flows are unchanged.
@spydon spydon requested a review from a team as a code owner June 25, 2026 10:18
@github-actions github-actions Bot added the auth This issue or pull request is related to authentication label Jun 25, 2026
@spydon spydon merged commit 33402e8 into main Jun 25, 2026
28 checks passed
@spydon spydon deleted the lukasklingsbo/sdk-1023-parityauth-resend-with-pkce-flow-should-include branch June 25, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth This issue or pull request is related to authentication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants