[PR #7593] [MERGED] fix: respect the explicitly set sendOnSignUp option #15674

Closed
opened 2026-04-13 10:10:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7593
Author: @bytaesu
Created: 1/24/2026
Status: Merged
Merged: 1/25/2026
Merged by: @himself65

Base: canaryHead: 2026-01-24/fix/respect-send-on-sign-up


📝 Commits (1)

  • 9a0bba9 fix: respect the explicitly set sendOnSignUp option

📊 Changes

4 files changed (+99 additions, -8 deletions)

View changed files

📝 docs/content/docs/reference/options.mdx (+1 -1)
📝 packages/better-auth/src/api/routes/sign-up.test.ts (+88 -0)
📝 packages/better-auth/src/api/routes/sign-up.ts (+4 -4)
📝 packages/core/src/types/init-options.ts (+6 -3)

📄 Description

Note

Existing logic already behaves as if the default were undefined, so this is not a breaking change.
Respecting an explicitly set option is more predictable than silently ignoring it, so this request makes sense.


Summary by cubic

Respect the explicitly set emailVerification.sendOnSignUp option in sign-up. False now blocks auto verification emails even if requireEmailVerification is true; undefined follows requireEmailVerification by default.

  • Bug Fixes
    • Use sendOnSignUp ?? requireEmailVerification to decide email sending.
    • Added tests for true, false, and undefined scenarios.
    • Updated docs and types to clarify defaults and behavior.

Written for commit 9a0bba92c2. Summary will update 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/7593 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 1/24/2026 **Status:** ✅ Merged **Merged:** 1/25/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `2026-01-24/fix/respect-send-on-sign-up` --- ### 📝 Commits (1) - [`9a0bba9`](https://github.com/better-auth/better-auth/commit/9a0bba92c2fd582067febccbc72abaebe4891d8a) fix: respect the explicitly set sendOnSignUp option ### 📊 Changes **4 files changed** (+99 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/reference/options.mdx` (+1 -1) 📝 `packages/better-auth/src/api/routes/sign-up.test.ts` (+88 -0) 📝 `packages/better-auth/src/api/routes/sign-up.ts` (+4 -4) 📝 `packages/core/src/types/init-options.ts` (+6 -3) </details> ### 📄 Description > [!NOTE] > Existing logic already behaves as if the default were `undefined`, so this is not a breaking change. > Respecting an explicitly set option is more predictable than silently ignoring it, so this request makes sense. - Closes https://github.com/better-auth/better-auth/issues/3494 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Respect the explicitly set emailVerification.sendOnSignUp option in sign-up. False now blocks auto verification emails even if requireEmailVerification is true; undefined follows requireEmailVerification by default. - **Bug Fixes** - Use sendOnSignUp ?? requireEmailVerification to decide email sending. - Added tests for true, false, and undefined scenarios. - Updated docs and types to clarify defaults and behavior. <sup>Written for commit 9a0bba92c2fd582067febccbc72abaebe4891d8a. Summary will update 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-04-13 10:10:00 -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#15674