[PR #6862] [MERGED] fix(phone-number): reset password should create credential account #32530

Closed
opened 2026-04-17 23:19:44 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6862
Author: @jslno
Created: 12/18/2025
Status: Merged
Merged: 2/17/2026
Merged by: @Bekacru

Base: canaryHead: 12-18-2025/phone-number-reset-account


📝 Commits (8)

  • d397de8 fix(phone-number): reset password should create credential account
  • 58c878f chore: fix linting
  • 977f400 Merge branch 'canary' into 12-18-2025/phone-number-reset-account
  • 271ac8b fix: clean up broken merge codes
  • 12ea1a1 Merge branch 'canary' into 12-18-2025/phone-number-reset-account
  • 2ee5604 chore: fix linting
  • b93ff7e Merge branch 'canary' into 12-18-2025/phone-number-reset-account
  • b2fac6f Merge branch 'canary' into 12-18-2025/phone-number-reset-account

📊 Changes

2 files changed (+57 additions, -5 deletions)

View changed files

📝 packages/better-auth/src/plugins/phone-number/phone-number.test.ts (+32 -1)
📝 packages/better-auth/src/plugins/phone-number/routes.ts (+25 -4)

📄 Description

closes #6831


Summary by cubic

Fixes phone-number password reset to create a credential account when missing, so users can sign in with email/password after the reset.

  • Bug Fixes
    • Join accounts when fetching the user; create the "credential" account with the hashed password if missing, otherwise update the existing password.
    • Added a test for a phone-only user verifying email/password sign-in works after reset; merged canary and fixed lint.

Written for commit b2fac6faa3. 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/6862 **Author:** [@jslno](https://github.com/jslno) **Created:** 12/18/2025 **Status:** ✅ Merged **Merged:** 2/17/2026 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `12-18-2025/phone-number-reset-account` --- ### 📝 Commits (8) - [`d397de8`](https://github.com/better-auth/better-auth/commit/d397de8719e2f889be1f89d56a26d5887d40dd7f) fix(phone-number): reset password should create credential account - [`58c878f`](https://github.com/better-auth/better-auth/commit/58c878fd2bd6e93b614e00fa1f73d88296dbab67) chore: fix linting - [`977f400`](https://github.com/better-auth/better-auth/commit/977f400cf57a9de4fd5ca40fd41d80abfb779761) Merge branch 'canary' into 12-18-2025/phone-number-reset-account - [`271ac8b`](https://github.com/better-auth/better-auth/commit/271ac8bd2bdff2532b4e008bd91509a6ae1b02d7) fix: clean up broken merge codes - [`12ea1a1`](https://github.com/better-auth/better-auth/commit/12ea1a1587b9aae6215e3df90be0f8d77d5fe607) Merge branch 'canary' into 12-18-2025/phone-number-reset-account - [`2ee5604`](https://github.com/better-auth/better-auth/commit/2ee56044d69ff994ddf03f175af35a0d7633b359) chore: fix linting - [`b93ff7e`](https://github.com/better-auth/better-auth/commit/b93ff7e151e20ece57fcb9c08878998557c795f1) Merge branch 'canary' into 12-18-2025/phone-number-reset-account - [`b2fac6f`](https://github.com/better-auth/better-auth/commit/b2fac6faa325046cc4cc66e4b5e7b4bc1f180481) Merge branch 'canary' into 12-18-2025/phone-number-reset-account ### 📊 Changes **2 files changed** (+57 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/phone-number/phone-number.test.ts` (+32 -1) 📝 `packages/better-auth/src/plugins/phone-number/routes.ts` (+25 -4) </details> ### 📄 Description closes #6831 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes phone-number password reset to create a credential account when missing, so users can sign in with email/password after the reset. - **Bug Fixes** - Join accounts when fetching the user; create the "credential" account with the hashed password if missing, otherwise update the existing password. - Added a test for a phone-only user verifying email/password sign-in works after reset; merged canary and fixed lint. <sup>Written for commit b2fac6faa325046cc4cc66e4b5e7b4bc1f180481. 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-17 23:19:44 -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#32530