fix(auth): return null user and session for email_change single-confirmation verifyOtp#2378
Merged
Merged
Conversation
…rmation verifyOtp
@supabase/auth-js
@supabase/functions-js
@supabase/postgrest-js
@supabase/realtime-js
@supabase/storage-js
@supabase/supabase-js
commit: |
jgoux
approved these changes
May 18, 2026
This was referenced May 18, 2026
mandarini
pushed a commit
to supabase/ssr
that referenced
this pull request
May 18, 2026
This PR updates `@supabase/supabase-js` to v2.106.0. **Source**: supabase-js-stable-release --- ## Release Notes ## v2.106.0 ## 2.106.0 (2026-05-18) ### 🚀 Features - **supabase:** W3C/OpenTelemetry trace context propagation ([#2163](supabase/supabase-js#2163)) ### 🩹 Fixes - **auth:** return null user and session for email_change single-confirmation verifyOtp ([#2378](supabase/supabase-js#2378)) - **release:** mark @supabase/tracing private and snapshot it for JSR ([#2370](supabase/supabase-js#2370)) - **storage:** make StreamDownloadBuilder implement Promise and memoize executor ([#2367](supabase/supabase-js#2367)) ### ❤️ Thank You - Claude Sonnet 4.5 - Guilherme Souza - Katerina Skroumpelou @mandarini - oniani1 This PR was created automatically. Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
mandarini
pushed a commit
to supabase/supabase
that referenced
this pull request
May 19, 2026
This PR updates @supabase/*-js libraries to version 2.106.0. **Source**: supabase-js-stable-release **Changes**: - Updated @supabase/supabase-js to 2.106.0 - Updated @supabase/auth-js to 2.106.0 - Updated @supabase/realtime-js to 2.106.0 - Updated @supabase/postgest-js to 2.106.0 - Refreshed pnpm-lock.yaml --- ## Release Notes ## v2.106.0 ## 2.106.0 (2026-05-18) ### 🚀 Features - **supabase:** W3C/OpenTelemetry trace context propagation ([#2163](supabase/supabase-js#2163)) ### 🩹 Fixes - **auth:** return null user and session for email_change single-confirmation verifyOtp ([#2378](supabase/supabase-js#2378)) - **release:** mark @supabase/tracing private and snapshot it for JSR ([#2370](supabase/supabase-js#2370)) - **storage:** make StreamDownloadBuilder implement Promise and memoize executor ([#2367](supabase/supabase-js#2367)) ### ❤️ Thank You - Claude Sonnet 4.5 - Guilherme Souza - Katerina Skroumpelou @mandarini - oniani1 This PR was created automatically. Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
This was referenced May 19, 2026
This was referenced May 21, 2026
This was referenced Jun 2, 2026
This was referenced Jun 9, 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.
Fixes #2377. When secure email change is enabled, gotrue's
POST /verifyreturns{ msg, code }(200 OK) after the first of two confirmations succeeds._sessionResponsewas falling through to a(data as User)cast, soverifyOtp({ type: 'email_change' })surfaced the message object asdata.user, contradicting the declaredAuthResponsetype.This drops the unsafe fallback in
_sessionResponseand returns{ user: null, session: null }for that branch, then tightensverifyOtp's localuserannotation to match. Adds unit tests for_sessionResponse(session present, single-confirmation, user-without-session) and a mocked-fetch test forverifyOtpcovering the reported case. No behavior change for any other caller of_sessionResponse.