[PR #6324] [MERGED] fix: updateUser image type should allow null #23494

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6324
Author: @ping-maxwell
Created: 11/26/2025
Status: Merged
Merged: 11/26/2025
Merged by: @Bekacru

Base: canaryHead: fix/update-user-image-types


📝 Commits (2)

  • 84ccd31 fix: updateUser image type should allow null
  • 8957ee1 fix: missing openAPI specification

📊 Changes

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

View changed files

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

📄 Description

Currently you get a type error saying image can't be null on the updateUser endpoint, this is incorrect. Currently, this issue does not affect authClient, only auth.api.


Summary by cubic

Fixes the updateUser API typing to allow image: null and updates the OpenAPI schema to mark the field as nullable, so clearing a user’s image no longer throws a type error. This affects auth.api only; authClient already handles null.

Written for commit 8957ee17db. 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/6324 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 11/26/2025 **Status:** ✅ Merged **Merged:** 11/26/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/update-user-image-types` --- ### 📝 Commits (2) - [`84ccd31`](https://github.com/better-auth/better-auth/commit/84ccd311fedacd3e5b869a3b860e50304c43d835) fix: updateUser `image` type should allow null - [`8957ee1`](https://github.com/better-auth/better-auth/commit/8957ee17db1d3d988e91b13febf53774ef283e1f) fix: missing openAPI specification ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/update-user.ts` (+2 -1) </details> ### 📄 Description Currently you get a type error saying `image` can't be `null` on the updateUser endpoint, this is incorrect. Currently, this issue does not affect authClient, only auth.api. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes the updateUser API typing to allow image: null and updates the OpenAPI schema to mark the field as nullable, so clearing a user’s image no longer throws a type error. This affects auth.api only; authClient already handles null. <sup>Written for commit 8957ee17db1d3d988e91b13febf53774ef283e1f. 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-15 21:45:51 -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#23494