[PR #4816] [CLOSED] feat: add onPasswordReset callback for resetting password using email OTP flow #31192

Closed
opened 2026-04-17 22:06:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4816
Author: @HoshangDEV
Created: 9/22/2025
Status: Closed

Base: canaryHead: refactor/email-otp-reset-password


📝 Commits (1)

  • 119dfd2 feat: add onPasswordReset callback for resetting password using email OTP flow

📊 Changes

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

View changed files

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

📄 Description

  • Enhanced resetPasswordEmailOTP endpoint in packages/better-auth/src/plugins/email-otp/index.ts:1124-1131
  • Added callback invocation after successful password reset and before response

Summary by cubic

Added an onPasswordReset callback to the email OTP password reset flow. It runs after a successful reset and before the response, receiving { user } and the request.


🔄 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/4816 **Author:** [@HoshangDEV](https://github.com/HoshangDEV) **Created:** 9/22/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `refactor/email-otp-reset-password` --- ### 📝 Commits (1) - [`119dfd2`](https://github.com/better-auth/better-auth/commit/119dfd23b39ca8be05b121b150995bb049bfd05c) feat: add onPasswordReset callback for resetting password using email OTP flow ### 📊 Changes **1 file changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/email-otp/index.ts` (+9 -0) </details> ### 📄 Description - Enhanced resetPasswordEmailOTP endpoint in packages/better-auth/src/plugins/email-otp/index.ts:1124-1131 - Added callback invocation after successful password reset and before response <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Added an onPasswordReset callback to the email OTP password reset flow. It runs after a successful reset and before the response, receiving { user } and the request. <!-- 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-17 22:06:16 -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#31192