[PR #2974] [MERGED] fix(email-otp): doesn't call onEmailVerification #30180

Closed
opened 2026-04-17 21:21:09 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

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

Base: mainHead: fix/email-otp-not-calling-onEmailVerfication


📝 Commits (1)

  • 28255c4 fix(email-otp): doesn't call onEmailVerification

📊 Changes

1 file changed (+4 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/plugins/email-otp/index.ts (+4 -0)

📄 Description

Not too long ago we made email-otp set emailVerified to true, however we forgot to add implementation to call the onEmailVerification fn which could be possibly defined in the users auth config.

WIth this change, upon email-otp verification, the user will be emailVerified and the onEmailVerification fn will be called.


🔄 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/2974 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 6/10/2025 **Status:** ✅ Merged **Merged:** 6/28/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/email-otp-not-calling-onEmailVerfication` --- ### 📝 Commits (1) - [`28255c4`](https://github.com/better-auth/better-auth/commit/28255c4ea45255fb0fc1b1b1edbccf8df13d80d8) fix(email-otp): doesn't call onEmailVerification ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/email-otp/index.ts` (+4 -0) </details> ### 📄 Description Not too long ago we made email-otp set `emailVerified` to true, however we forgot to add implementation to call the `onEmailVerification` fn which could be possibly defined in the users auth config. WIth this change, upon email-otp verification, the user will be `emailVerified` and the `onEmailVerification` fn will be called. --- <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-17 21:21:09 -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#30180