fix(gotrue): include code challenge in resend with PKCE flow#1469
Merged
spydon merged 1 commit intoJun 25, 2026
Merged
Conversation
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.
grdsdev
approved these changes
Jun 25, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
When
resend()is called with anemailwhile the client uses the PKCE flow (the default), thePOST /resendrequest now includescode_challengeandcode_challenge_method. Without the code challenge, the resent confirmation link cannot be completed viaexchangeCodeForSession.This brings the Dart SDK to parity with the supabase-js behavior.
Behavior
resend(email:)in PKCE flow includescode_challenge+code_challenge_method: s256in the body.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