[PR #822] [MERGED] fix: Allow empty name in updateUser #29094

Closed
opened 2026-04-17 20:29:47 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/822
Author: @ngregrichardson
Created: 12/8/2024
Status: Merged
Merged: 12/8/2024
Merged by: @Bekacru

Base: mainHead: fix/update-empty-name


📝 Commits (2)

  • 90a0449 fix: Allow empty name in updateUser
  • d00af07 fix: Fix formatting to pass biome check

📊 Changes

1 file changed (+5 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/api/routes/update-user.ts (+5 -1)

📄 Description

Due to a !name, the following code wouldn't work:

await auth.api.updateUser({
    body: {
        name: ''
    },
    headers: await headers()
});

🔄 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/822 **Author:** [@ngregrichardson](https://github.com/ngregrichardson) **Created:** 12/8/2024 **Status:** ✅ Merged **Merged:** 12/8/2024 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/update-empty-name` --- ### 📝 Commits (2) - [`90a0449`](https://github.com/better-auth/better-auth/commit/90a04499619b386364f7527673b7658edc67fad2) fix: Allow empty name in updateUser - [`d00af07`](https://github.com/better-auth/better-auth/commit/d00af07bba0809fc904c951132188c7a93142b47) fix: Fix formatting to pass biome check ### 📊 Changes **1 file changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/update-user.ts` (+5 -1) </details> ### 📄 Description Due to a `!name`, the following code wouldn't work: ```ts await auth.api.updateUser({ body: { name: '' }, headers: await headers() }); ``` --- <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 20:29:48 -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#29094