[PR #3357] [MERGED] fix: add image option to signUpEmail types and schema #30381

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3357
Author: @acusti
Created: 7/12/2025
Status: Merged
Merged: 7/12/2025
Merged by: @Bekacru

Base: mainHead: signup-image-field-type


📝 Commits (1)

  • a558aad fix: add image option to signUpEmail types and schema

📊 Changes

2 files changed (+6 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/api/routes/sign-up.test.ts (+1 -0)
📝 packages/better-auth/src/api/routes/sign-up.ts (+5 -0)

📄 Description

signUpEmail destructures the optional image field from the request body and uses it when creating the user, but the field isn’t in the requestBody schema or the $Infer body type.

I updated the packages/better-auth/src/api/routes/sign-up.test.ts file’s should work with custom fields on account table test to include image alongside email, password, and name, and it demonstrates that the types are now correct (no type error). However, the test description seems misleading; I assumed that “custom fields” referred to the AdditionalUserFieldsInput that can be defined via the additionalFields.user part of the betterAuth config, whereas the test seems to only verify the fields with built-in support. I’d be happy to update the test description if that would be helpful, but because I wasn’t sure if my interpretation is correct, I decided to leave it as is for now.

Lastly, sorry about not using the fix/ branch name prefix. I didn’t notice that part of the contribution guidelines until after I’d created the PR. Happy to close this PR and rename the branch and open a new one if that’s preferable.

Thanks!


Summary by cubic

Added the optional image field to the signUpEmail request schema and types so users can provide a profile image during sign up.


🔄 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/3357 **Author:** [@acusti](https://github.com/acusti) **Created:** 7/12/2025 **Status:** ✅ Merged **Merged:** 7/12/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `signup-image-field-type` --- ### 📝 Commits (1) - [`a558aad`](https://github.com/better-auth/better-auth/commit/a558aadd549b7e7a3fdec36f3721459034337bc2) fix: add `image` option to `signUpEmail` types and schema ### 📊 Changes **2 files changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/sign-up.test.ts` (+1 -0) 📝 `packages/better-auth/src/api/routes/sign-up.ts` (+5 -0) </details> ### 📄 Description `signUpEmail` destructures the optional `image` field from the request body and uses it when creating the user, but the field isn’t in the `requestBody` schema or the `$Infer` `body` type. I updated the `packages/better-auth/src/api/routes/sign-up.test.ts` file’s `should work with custom fields on account table` test to include `image` alongside `email`, `password`, and `name`, and it demonstrates that the types are now correct (no type error). However, the test description seems misleading; I assumed that “custom fields” referred to the `AdditionalUserFieldsInput` that can be defined via the `additionalFields.user` part of the `betterAuth` config, whereas the test seems to only verify the fields with built-in support. I’d be happy to update the test description if that would be helpful, but because I wasn’t sure if my interpretation is correct, I decided to leave it as is for now. Lastly, sorry about not using the `fix/` branch name prefix. I didn’t notice that part of the contribution guidelines until after I’d created the PR. Happy to close this PR and rename the branch and open a new one if that’s preferable. Thanks! <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Added the optional image field to the signUpEmail request schema and types so users can provide a profile image during sign up. <!-- 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 21:29:41 -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#30381