[PR #5794] [MERGED] fix(email-otp): prevent duplicate verification emails when override is enabled #6228

Closed
opened 2026-03-13 12:51:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5794
Author: @ephraimduncan
Created: 11/6/2025
Status: Merged
Merged: 11/12/2025
Merged by: @Bekacru

Base: canaryHead: fix/email-otp-duplicate-verification


📝 Commits (1)

  • 14de5a8 fix(email-otp): prevent duplicate verification emails when override is enabled

📊 Changes

2 files changed (+44 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/plugins/email-otp/email-otp.test.ts (+42 -0)
📝 packages/better-auth/src/plugins/email-otp/index.ts (+2 -1)

📄 Description

Summary by cubic

Prevents duplicate verification emails on sign-up when email OTP override is enabled. Users now receive a single verification email from the override, not both.

  • Bug Fixes
    • Disable default send-on-sign-up when overrideDefaultEmailVerification is true.
    • Add test to confirm sendVerificationOTP is called once with the correct payload.

Written for commit 14de5a80dc. Summary will update automatically on new commits.


🔄 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/5794 **Author:** [@ephraimduncan](https://github.com/ephraimduncan) **Created:** 11/6/2025 **Status:** ✅ Merged **Merged:** 11/12/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/email-otp-duplicate-verification` --- ### 📝 Commits (1) - [`14de5a8`](https://github.com/better-auth/better-auth/commit/14de5a80dc949b08e7ecfedaa8d630bf836a4a71) fix(email-otp): prevent duplicate verification emails when override is enabled ### 📊 Changes **2 files changed** (+44 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/email-otp/email-otp.test.ts` (+42 -0) 📝 `packages/better-auth/src/plugins/email-otp/index.ts` (+2 -1) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Prevents duplicate verification emails on sign-up when email OTP override is enabled. Users now receive a single verification email from the override, not both. - **Bug Fixes** - Disable default send-on-sign-up when overrideDefaultEmailVerification is true. - Add test to confirm sendVerificationOTP is called once with the correct payload. <sup>Written for commit 14de5a80dc949b08e7ecfedaa8d630bf836a4a71. Summary will update automatically on new commits.</sup> <!-- 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-03-13 12:51: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#6228