[PR #5455] [MERGED] fix: remove deprecated forgetPassword endpoints #22919

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5455
Author: @bytaesu
Created: 10/21/2025
Status: Merged
Merged: 10/22/2025
Merged by: @himself65

Base: canaryHead: 2025-10-21/fix/remove-forgetpassword-endpoint


📝 Commits (2)

  • 34807e0 fix: remove deprecated forgetPassword endpoints
  • ecf7c55 fix: remove deprecated forgetPasswordPhoneNumber endpoint

📊 Changes

4 files changed (+1 additions, -200 deletions)

View changed files

📝 packages/better-auth/src/api/index.ts (+0 -4)
📝 packages/better-auth/src/api/routes/reset-password.ts (+0 -111)
📝 packages/better-auth/src/plugins/captcha/constants.ts (+1 -1)
📝 packages/better-auth/src/plugins/phone-number/index.ts (+0 -84)

📄 Description

This PR removes the deprecated /phone-number/forget-password, /forget-password, /reset-password endpoints. Since the internal logic, including test code, has already been migrated to new endpoints, this change has no impact.

TODO: I’m not fully familiar with Expo, so I didn’t modify the demo. It may need to be updated later.


Summary by cubic

Remove deprecated /forget-password endpoints in favor of /request-password-reset. No behavior change to the reset flow; routes and captcha defaults now point to the new endpoints only.

  • Refactors

    • Removed forgetPassword and forgetPasswordCallback endpoints and exports.
    • Kept requestPasswordReset and requestPasswordResetCallback as the sole flow.
    • Updated captcha defaultEndpoints to use /request-password-reset.
  • Migration

    • Replace POST /forget-password with POST /request-password-reset in clients.
    • Update any custom captcha config or route allowlists referencing /forget-password.
    • If the demo or Expo app references /forget-password, update those links.

🔄 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/5455 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 10/21/2025 **Status:** ✅ Merged **Merged:** 10/22/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `2025-10-21/fix/remove-forgetpassword-endpoint` --- ### 📝 Commits (2) - [`34807e0`](https://github.com/better-auth/better-auth/commit/34807e0085201c52df542475b3ee6700598fe29a) fix: remove deprecated forgetPassword endpoints - [`ecf7c55`](https://github.com/better-auth/better-auth/commit/ecf7c552a593e0099a3b73352d30952ef21393c6) fix: remove deprecated forgetPasswordPhoneNumber endpoint ### 📊 Changes **4 files changed** (+1 additions, -200 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/index.ts` (+0 -4) 📝 `packages/better-auth/src/api/routes/reset-password.ts` (+0 -111) 📝 `packages/better-auth/src/plugins/captcha/constants.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/phone-number/index.ts` (+0 -84) </details> ### 📄 Description This PR removes the deprecated `/phone-number/forget-password`, `/forget-password`, `/reset-password` endpoints. Since the internal logic, including test code, has already been migrated to new endpoints, this change has no impact. TODO: I’m not fully familiar with Expo, so I didn’t modify the demo. It may need to be updated later. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Remove deprecated /forget-password endpoints in favor of /request-password-reset. No behavior change to the reset flow; routes and captcha defaults now point to the new endpoints only. - **Refactors** - Removed forgetPassword and forgetPasswordCallback endpoints and exports. - Kept requestPasswordReset and requestPasswordResetCallback as the sole flow. - Updated captcha defaultEndpoints to use /request-password-reset. - **Migration** - Replace POST /forget-password with POST /request-password-reset in clients. - Update any custom captcha config or route allowlists referencing /forget-password. - If the demo or Expo app references /forget-password, update those links. <!-- 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 21:22:05 -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#22919