[PR #5219] [MERGED] fix(email-otp): email-verification doesn't trigger session signal #22762

Closed
opened 2026-04-15 21:15:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5219
Author: @ping-maxwell
Created: 10/10/2025
Status: Merged
Merged: 10/12/2025
Merged by: @Bekacru

Base: canaryHead: fix/email-otp-verification-trigger-session-signal


📝 Commits (6)

  • 29bdf1b fix(email-otp): email-verification doesn't trigger session signal
  • 64092ab chore: lint
  • acc00c6 fix: cookie cache not updating emailVerified
  • 2ea67d0 fix: use current dontRememberMe cookie
  • 37eb713 fix: change req
  • b4009bf Merge branch 'canary' into fix/email-otp-verification-trigger-session-signal

📊 Changes

2 files changed (+26 additions, -3 deletions)

View changed files

📝 packages/better-auth/src/plugins/email-otp/client.ts (+6 -0)
📝 packages/better-auth/src/plugins/email-otp/index.ts (+20 -3)

📄 Description

closes: https://github.com/better-auth/better-auth/issues/1286
linear: https://linear.app/better-auth/issue/ENG-41/fix-revalidate-session-after-emailotpverifyemail


Summary by cubic

Email OTP verification now triggers the session signal so the client revalidates the session right after /email-otp/verify-email. Aligns with Linear ENG-41 to prevent stale auth state.

  • Bug Fixes
    • Added atom listener for "/email-otp/verify-email" to emit "$sessionSignal" and refresh the session.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5219 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 10/10/2025 **Status:** ✅ Merged **Merged:** 10/12/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/email-otp-verification-trigger-session-signal` --- ### 📝 Commits (6) - [`29bdf1b`](https://github.com/better-auth/better-auth/commit/29bdf1b4bfd5fb966d7a21efde87b35e08ad8472) fix(email-otp): email-verification doesn't trigger session signal - [`64092ab`](https://github.com/better-auth/better-auth/commit/64092abdd3e17f8d095f00278212d4c2ff47c26e) chore: lint - [`acc00c6`](https://github.com/better-auth/better-auth/commit/acc00c6110ead871c79055be05005803e3a4d217) fix: cookie cache not updating `emailVerified` - [`2ea67d0`](https://github.com/better-auth/better-auth/commit/2ea67d015aafa6bd8745e7c06a79aa0ef445b95d) fix: use current dontRememberMe cookie - [`37eb713`](https://github.com/better-auth/better-auth/commit/37eb7131afe41227d0e38a98a50cfb0f838de35f) fix: change req - [`b4009bf`](https://github.com/better-auth/better-auth/commit/b4009bf05675b8c2c14e0f27ee4c3af2f3856cc3) Merge branch 'canary' into fix/email-otp-verification-trigger-session-signal ### 📊 Changes **2 files changed** (+26 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/email-otp/client.ts` (+6 -0) 📝 `packages/better-auth/src/plugins/email-otp/index.ts` (+20 -3) </details> ### 📄 Description closes: https://github.com/better-auth/better-auth/issues/1286 linear: https://linear.app/better-auth/issue/ENG-41/fix-revalidate-session-after-emailotpverifyemail <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Email OTP verification now triggers the session signal so the client revalidates the session right after /email-otp/verify-email. Aligns with Linear ENG-41 to prevent stale auth state. - **Bug Fixes** - Added atom listener for "/email-otp/verify-email" to emit "$sessionSignal" and refresh the session. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 21:15:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#22762