[PR #6401] [MERGED] docs: clarify credential account requirement for phone number plugin #23541

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6401
Author: @GautamBytes
Created: 11/29/2025
Status: Merged
Merged: 4/9/2026
Merged by: @ping-maxwell

Base: mainHead: docs/phone-plugin-credential-requirement


📝 Commits (2)

  • e8cb8ea docs: clarify account requirement for phone number plugin and migration guide
  • 1e8cb52 Merge branch 'main' into docs/phone-plugin-credential-requirement

📊 Changes

2 files changed (+10 additions, -0 deletions)

View changed files

📝 docs/content/docs/guides/next-auth-migration-guide.mdx (+6 -0)
📝 docs/content/docs/plugins/phone-number.mdx (+4 -0)

📄 Description

Description

Closes #6396

This PR addresses a documentation gap regarding the Phone Number plugin's password sign-in flow.

Context:
As identified in #6396, the phoneNumber plugin strictly requires a user to have a linked record in the account table with providerId: "credential" to authenticate via password. This logic is hardcoded in the plugin source but was not previously documented.

Changes:

  1. Plugin Docs (phone-number.mdx): Added a warn callout in the "Sign In with Phone Number" section to explicitly state this requirement.
  2. Migration Guide (next-auth-migration-guide.mdx): Added a warn callout in the Database Models comparison section. This is critical for users migrating from Auth.js (NextAuth), where passwords were often stored on the User model, causing silent failures if the Account record is missing.

Summary by cubic

Clarified docs that phone number + password sign-in requires an Account record with providerId: "credential".
Added warn callouts in the Phone Number plugin docs and migration guide to prevent silent failures and highlight that passwords must be stored in Account, not User (for Auth.js migrations).

Written for commit 1e8cb52f05. 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/6401 **Author:** [@GautamBytes](https://github.com/GautamBytes) **Created:** 11/29/2025 **Status:** ✅ Merged **Merged:** 4/9/2026 **Merged by:** [@ping-maxwell](https://github.com/ping-maxwell) **Base:** `main` ← **Head:** `docs/phone-plugin-credential-requirement` --- ### 📝 Commits (2) - [`e8cb8ea`](https://github.com/better-auth/better-auth/commit/e8cb8eac3277152759a3ff15e750dc6661f32404) docs: clarify account requirement for phone number plugin and migration guide - [`1e8cb52`](https://github.com/better-auth/better-auth/commit/1e8cb52f0500492aaf4e5a3ff6012a88271fa0b6) Merge branch 'main' into docs/phone-plugin-credential-requirement ### 📊 Changes **2 files changed** (+10 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/guides/next-auth-migration-guide.mdx` (+6 -0) 📝 `docs/content/docs/plugins/phone-number.mdx` (+4 -0) </details> ### 📄 Description # Description Closes #6396 This PR addresses a documentation gap regarding the **Phone Number** plugin's password sign-in flow. **Context:** As identified in #6396, the `phoneNumber` plugin strictly requires a user to have a linked record in the `account` table with `providerId: "credential"` to authenticate via password. This logic is hardcoded in the plugin source but was not previously documented. **Changes:** 1. **Plugin Docs (`phone-number.mdx`):** Added a `warn` callout in the "Sign In with Phone Number" section to explicitly state this requirement. 2. **Migration Guide (`next-auth-migration-guide.mdx`):** Added a `warn` callout in the Database Models comparison section. This is critical for users migrating from Auth.js (NextAuth), where passwords were often stored on the `User` model, causing silent failures if the `Account` record is missing. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Clarified docs that phone number + password sign-in requires an `Account` record with `providerId: "credential"`. Added warn callouts in the Phone Number plugin docs and migration guide to prevent silent failures and highlight that passwords must be stored in `Account`, not `User` (for Auth.js migrations). <sup>Written for commit 1e8cb52f0500492aaf4e5a3ff6012a88271fa0b6. 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 21:48:30 -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#23541