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
feat(auth): send PKCE code_challenge in updateUser when changing email (#1601)
## Summary
Under the PKCE flow, `updateUser({ email })` now generates a PKCE code
verifier and sends the corresponding `code_challenge` /
`code_challenge_method` in the request body, mirroring what `resend()`
and `getSSOSignInUrl` already do. This lets an email change started
under PKCE complete via `exchangeCodeForSession()`.
The fields are only added when an email is being changed, so no public
API surface or return type changes. Non-PKCE flows are unaffected (the
challenge is `null`).
## Outcome
implemented
## Reference
- supabase-js parity, following the already-shipped Dart `resend()` PKCE
work (SDK-1023).
## Compliance matrix
- `auth.session.update_user` → `implemented` (was
`partially_implemented`).
## Tests
- Added mock tests in `packages/gotrue/test/otp_mock_test.dart`: PKCE
email change includes the code challenge, non-email updates omit it, and
implicit flow omits it.
Closes SDK-1318
0 commit comments