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

Open
opened 2026-03-13 13:06:25 -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: 🔄 Open

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


📝 Commits (1)

  • bdf2d41 docs: clarify account requirement for phone number plugin and migration guide

📊 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 that phone number + password sign-in requires an Account record with providerId "credential" and documented this requirement to prevent silent failures.

Added warn callouts in the Phone Number plugin docs and the migration guide, noting the difference from Auth.js where passwords may be stored on the User model.

Written for commit bdf2d41f97cb30558454c62a8eec2791730b0a15. Summary will update automatically 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:** 🔄 Open **Base:** `canary` ← **Head:** `docs/phone-plugin-credential-requirement` --- ### 📝 Commits (1) - [`bdf2d41`](https://github.com/better-auth/better-auth/commit/bdf2d41f97cb30558454c62a8eec2791730b0a15) docs: clarify account requirement for phone number plugin and migration guide ### 📊 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 that phone number + password sign-in requires an Account record with providerId "credential" and documented this requirement to prevent silent failures. Added warn callouts in the Phone Number plugin docs and the migration guide, noting the difference from Auth.js where passwords may be stored on the User model. <sup>Written for commit bdf2d41f97cb30558454c62a8eec2791730b0a15. Summary will update automatically 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-03-13 13:06:25 -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#6640