[PR #6611] [MERGED] fix(username): await username validator #32378

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6611
Author: @jslno
Created: 12/8/2025
Status: Merged
Merged: 12/8/2025
Merged by: @Bekacru

Base: canaryHead: 12-08-2025/await-username-validator


📝 Commits (5)

  • 653ec35 fix(username): await username validator
  • f989d8b Merge branch 'canary' into 12-08-2025/await-username-validator
  • 12591d3 refactor: move validator result to variable
  • 1ef0373 chore: update tests
  • cb36ade chore: fix linting

📊 Changes

2 files changed (+25 additions, -3 deletions)

View changed files

📝 packages/better-auth/src/plugins/username/index.ts (+4 -2)
📝 packages/better-auth/src/plugins/username/username.test.ts (+21 -1)

📄 Description

Summary by cubic

Await the username validator in the username plugin so async validators run correctly in availability checks and during sign-up/sign-in. Invalid usernames now fail with 422 USERNAME_IS_INVALID.

Written for commit cb36ade4a3. 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/6611 **Author:** [@jslno](https://github.com/jslno) **Created:** 12/8/2025 **Status:** ✅ Merged **Merged:** 12/8/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `12-08-2025/await-username-validator` --- ### 📝 Commits (5) - [`653ec35`](https://github.com/better-auth/better-auth/commit/653ec352b62864109bf3a0e4682b653b41e9cfba) fix(username): await username validator - [`f989d8b`](https://github.com/better-auth/better-auth/commit/f989d8b2fef3024a802e3e9e275b1102171de677) Merge branch 'canary' into 12-08-2025/await-username-validator - [`12591d3`](https://github.com/better-auth/better-auth/commit/12591d38f0aa2de5797e1a90003611c67a612765) refactor: move validator result to variable - [`1ef0373`](https://github.com/better-auth/better-auth/commit/1ef0373e81df05b3092cdddd40eace0104aeeb29) chore: update tests - [`cb36ade`](https://github.com/better-auth/better-auth/commit/cb36ade4a3e4f853bc45017146685114a24eeb08) chore: fix linting ### 📊 Changes **2 files changed** (+25 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/username/index.ts` (+4 -2) 📝 `packages/better-auth/src/plugins/username/username.test.ts` (+21 -1) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Await the username validator in the username plugin so async validators run correctly in availability checks and during sign-up/sign-in. Invalid usernames now fail with 422 USERNAME_IS_INVALID. <sup>Written for commit cb36ade4a3e4f853bc45017146685114a24eeb08. 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-17 23:12:27 -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#32378