[PR #7163] [MERGED] chore: tag onEmailVerification as deprecated #7112

Closed
opened 2026-03-13 13:24:31 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7163
Author: @himself65
Created: 1/7/2026
Status: Merged
Merged: 1/7/2026
Merged by: @himself65

Base: canaryHead: himself65/2026/01/07/depracate


📝 Commits (2)

  • d40d3a8 chore: tag onEmailVerification as deprecated
  • 916beba fix: await

📊 Changes

5 files changed (+74 additions, -4 deletions)

View changed files

📝 packages/better-auth/src/api/routes/email-verification.test.ts (+35 -0)
📝 packages/better-auth/src/api/routes/email-verification.ts (+6 -0)
📝 packages/better-auth/src/context/create-context.ts (+11 -0)
📝 packages/better-auth/src/plugins/email-otp/routes.ts (+12 -4)
📝 packages/core/src/types/init-options.ts (+10 -0)

📄 Description

Summary by cubic

Deprecated onEmailVerification in favor of beforeEmailVerification/afterEmailVerification. Added beforeEmailVerification to run before verification in both email and OTP flows; onEmailVerification now logs a deprecation warning but remains awaited.

  • Migration
    • Replace onEmailVerification with beforeEmailVerification or afterEmailVerification.
    • onEmailVerification is deprecated and will be removed in 1.5.

Written for commit 916bebaf18. 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/7163 **Author:** [@himself65](https://github.com/himself65) **Created:** 1/7/2026 **Status:** ✅ Merged **Merged:** 1/7/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2026/01/07/depracate` --- ### 📝 Commits (2) - [`d40d3a8`](https://github.com/better-auth/better-auth/commit/d40d3a87a98044d607a66d55ea4b55a04426acb5) chore: tag `onEmailVerification` as deprecated - [`916beba`](https://github.com/better-auth/better-auth/commit/916bebaf189e8d0b6369dd959269af454817e875) fix: await ### 📊 Changes **5 files changed** (+74 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/email-verification.test.ts` (+35 -0) 📝 `packages/better-auth/src/api/routes/email-verification.ts` (+6 -0) 📝 `packages/better-auth/src/context/create-context.ts` (+11 -0) 📝 `packages/better-auth/src/plugins/email-otp/routes.ts` (+12 -4) 📝 `packages/core/src/types/init-options.ts` (+10 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Deprecated onEmailVerification in favor of beforeEmailVerification/afterEmailVerification. Added beforeEmailVerification to run before verification in both email and OTP flows; onEmailVerification now logs a deprecation warning but remains awaited. - **Migration** - Replace onEmailVerification with beforeEmailVerification or afterEmailVerification. - onEmailVerification is deprecated and will be removed in 1.5. <sup>Written for commit 916bebaf189e8d0b6369dd959269af454817e875. 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-03-13 13:24:31 -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#7112