fix: add image option to signUpEmail types and schema (#3357)

`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
This commit is contained in:
Andrew Patton
2025-07-12 13:13:21 -07:00
committed by GitHub
parent 3fed4c0f70
commit 7835167b82
2 changed files with 6 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ describe("sign-up with custom fields", async (it) => {
email: "email@test.com",
password: "password",
name: "Test Name",
image: "https://picsum.photos/200",
},
});
expect(res.token).toBeDefined();

View File

@@ -24,6 +24,7 @@ export const signUpEmail = <O extends BetterAuthOptions>() =>
name: string;
email: string;
password: string;
image?: string;
callbackURL?: string;
rememberMe?: boolean;
} & AdditionalUserFieldsInput<O>,
@@ -48,6 +49,10 @@ export const signUpEmail = <O extends BetterAuthOptions>() =>
type: "string",
description: "The password of the user",
},
image: {
type: "string",
description: "The profile image URL of the user",
},
callbackURL: {
type: "string",
description: