[PR #6177] [MERGED] docs(username): add section on how to disable username avalibility endpoint #14750

Closed
opened 2026-04-13 09:37:10 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6177
Author: @Bekacru
Created: 11/21/2025
Status: Merged
Merged: 11/21/2025
Merged by: @Bekacru

Base: canaryHead: fix/username


📝 Commits (2)

  • 1259610 docs(username): add section on how to disable username avalibility endpoint
  • 55a6bb0 Merge branch 'canary' into fix/username

📊 Changes

2 files changed (+37 additions, -16 deletions)

View changed files

📝 docs/content/docs/plugins/username.mdx (+19 -0)
📝 packages/better-auth/src/plugins/username/index.ts (+18 -16)

📄 Description

Summary by cubic

Added docs on how to disable the /is-username-available endpoint to reduce username enumeration. Also hardened login by hashing passwords on invalid usernames and moved username/displayUsername normalization earlier in the flow.

  • Bug Fixes

    • Hash password when account is not found during sign-in to mitigate timing-based username discovery.
  • Refactors

    • Run username/displayUsername normalization before other hooks for /sign-up/email and /update-user.

Written for commit 55a6bb0729. 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/6177 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 11/21/2025 **Status:** ✅ Merged **Merged:** 11/21/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/username` --- ### 📝 Commits (2) - [`1259610`](https://github.com/better-auth/better-auth/commit/12596108caaf6bcbdaa3dc25ca168b5a9387326f) docs(username): add section on how to disable username avalibility endpoint - [`55a6bb0`](https://github.com/better-auth/better-auth/commit/55a6bb0729ed9f2665f8d08e90769ad6311e95c8) Merge branch 'canary' into fix/username ### 📊 Changes **2 files changed** (+37 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/username.mdx` (+19 -0) 📝 `packages/better-auth/src/plugins/username/index.ts` (+18 -16) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Added docs on how to disable the /is-username-available endpoint to reduce username enumeration. Also hardened login by hashing passwords on invalid usernames and moved username/displayUsername normalization earlier in the flow. - **Bug Fixes** - Hash password when account is not found during sign-in to mitigate timing-based username discovery. - **Refactors** - Run username/displayUsername normalization before other hooks for /sign-up/email and /update-user. <sup>Written for commit 55a6bb0729ed9f2665f8d08e90769ad6311e95c8. 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-04-13 09:37:10 -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#14750