[PR #7645] [MERGED] feat: mark /forget-password/email-otp as deprecation #24362

Closed
opened 2026-04-15 22:19:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7645
Author: @bytaesu
Created: 1/27/2026
Status: Merged
Merged: 1/28/2026
Merged by: @himself65

Base: canaryHead: 2026-01-28/chore/prepare-api-deprecation


📝 Commits (2)

  • 3979f8d chore: prepare '/forget-password/email-otp' deprecation
  • 63c659b fix: rename to '/email-otp/request-password-reset'

📊 Changes

4 files changed (+134 additions, -11 deletions)

View changed files

📝 docs/content/docs/plugins/email-otp.mdx (+8 -4)
📝 packages/better-auth/src/plugins/email-otp/email-otp.test.ts (+19 -3)
📝 packages/better-auth/src/plugins/email-otp/index.ts (+2 -0)
📝 packages/better-auth/src/plugins/email-otp/routes.ts (+105 -4)

📄 Description

/forget-password/email-otp/email-otp/request-password-reset for consistent API


Summary by cubic

Renamed the password reset email OTP endpoint to /request-password-reset/email-otp for consistency and added a deprecation warning for /forget-password/email-otp. Docs and tests updated; backward compatibility is preserved.

  • Migration
    • Use authClient.requestPasswordReset.emailOtp on the client and auth.api.requestPasswordResetEmailOTP on the server.
    • Payload unchanged: { email: string }.
    • /forget-password/email-otp still works but logs a deprecation warning and will be removed in the next major.

Written for commit 3979f8d8df. 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/7645 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 1/27/2026 **Status:** ✅ Merged **Merged:** 1/28/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `2026-01-28/chore/prepare-api-deprecation` --- ### 📝 Commits (2) - [`3979f8d`](https://github.com/better-auth/better-auth/commit/3979f8d8df588309a5f902af5bf5baf494354775) chore: prepare '/forget-password/email-otp' deprecation - [`63c659b`](https://github.com/better-auth/better-auth/commit/63c659b2a2e3ceeb1bcc5d5802591dcfb945e659) fix: rename to '/email-otp/request-password-reset' ### 📊 Changes **4 files changed** (+134 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/email-otp.mdx` (+8 -4) 📝 `packages/better-auth/src/plugins/email-otp/email-otp.test.ts` (+19 -3) 📝 `packages/better-auth/src/plugins/email-otp/index.ts` (+2 -0) 📝 `packages/better-auth/src/plugins/email-otp/routes.ts` (+105 -4) </details> ### 📄 Description `/forget-password/email-otp` → `/email-otp/request-password-reset` for consistent API <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Renamed the password reset email OTP endpoint to `/request-password-reset/email-otp` for consistency and added a deprecation warning for `/forget-password/email-otp`. Docs and tests updated; backward compatibility is preserved. - **Migration** - Use `authClient.requestPasswordReset.emailOtp` on the client and `auth.api.requestPasswordResetEmailOTP` on the server. - Payload unchanged: `{ email: string }`. - `/forget-password/email-otp` still works but logs a deprecation warning and will be removed in the next major. <sup>Written for commit 3979f8d8df588309a5f902af5bf5baf494354775. 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-15 22:19:56 -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#24362