Please make the name optional on the signUp on both the client and server #183

Open
opened 2026-03-13 07:36:34 -05:00 by GiteaMirror · 31 comments
Owner

Originally created by @firstaxel on GitHub (Nov 5, 2024).

Originally assigned to: @bytaesu on GitHub.

Originally created by @firstaxel on GitHub (Nov 5, 2024). Originally assigned to: @bytaesu on GitHub.
GiteaMirror added the breaking change label 2026-03-13 07:36:34 -05:00
Author
Owner

@firstaxel commented on GitHub (Nov 5, 2024):

not all signUp as i have seen doesnt ask for the user name

@firstaxel commented on GitHub (Nov 5, 2024): not all signUp as i have seen doesnt ask for the user name
Author
Owner

@itsderinger commented on GitHub (Nov 7, 2024):

@firstaxel, how did you resolve this? facing the same issue.

@itsderinger commented on GitHub (Nov 7, 2024): @firstaxel, how did you resolve this? facing the same issue.
Author
Owner

@firstaxel commented on GitHub (Nov 7, 2024):

you can bypass this error by
name: ""
the error is going to go

@firstaxel commented on GitHub (Nov 7, 2024): you can bypass this error by ` name: "" ` the error is going to go
Author
Owner

@itsderinger commented on GitHub (Nov 11, 2024):

you can bypass this error by name: "" the error is going to go

I figured, but that's really counter-intuitive, hence making the field optional in the config is still the better approach, imo.

@itsderinger commented on GitHub (Nov 11, 2024): > you can bypass this error by `name: ""` the error is going to go I figured, but that's really counter-intuitive, hence making the field optional in the config is still the better approach, imo.
Author
Owner

@itsderinger commented on GitHub (Nov 14, 2024):

@Bekacru What's your take? Would be cool to have it before v1?

@itsderinger commented on GitHub (Nov 14, 2024): @Bekacru What's your take? Would be cool to have it before v1?
Author
Owner

@chris-verclytte commented on GitHub (Dec 3, 2024):

Same here, you might easily have a user flow that just ask for the email and password and provide further details afterwards to limit the UX friction.

Maybe something like :

export const auth = betterAuth({
   user: {
    fields: {
      name: { required: false } // provide options instead of a simple string for mapping
    },
  },
})

// or 

export const auth = betterAuth({
   user: {
    additionalFields: {
      name: { required: false } // override default behavior when set in additionalFields
    },
  },
})

But it might even be preferable to get rid of the name in better-auth as you might want to split name with first_name / last_name in your DB and having name create an unnecessary column in the db.

@chris-verclytte commented on GitHub (Dec 3, 2024): Same here, you might easily have a user flow that just ask for the email and password and provide further details afterwards to limit the UX friction. Maybe something like : ```js export const auth = betterAuth({ user: { fields: { name: { required: false } // provide options instead of a simple string for mapping }, }, }) // or export const auth = betterAuth({ user: { additionalFields: { name: { required: false } // override default behavior when set in additionalFields }, }, }) ``` But it might even be preferable to get rid of the name in `better-auth` as you might want to split name with first_name / last_name in your DB and having name create an unnecessary column in the db.
Author
Owner

@firstaxel commented on GitHub (Dec 5, 2024):

Thanks this is true please fix it

On Tue, Dec 3, 2024, 2:20 PM Christophe Verclytte @.***>
wrote:

Same here, you might easily have a user flow that just ask for the email
and password and provide further details afterwards to limit the UX
friction.

Maybe something like :

export const auth = betterAuth({
user: {
fields: {
name: { required: false }
},
},})
// or
export const auth = betterAuth({
user: {
additionalFields: {
name: { required: false } // override
},
},})

But it might even be preferable to get rid of the name in better-auth as
you might want to split name with first_name / last_name in your DB and
having name create an unnecessary column in the db.


Reply to this email directly, view it on GitHub
https://github.com/better-auth/better-auth/issues/424#issuecomment-2514541504,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A5RGP2WQE7CC55MD3N32C3D2DWV2NAVCNFSM6AAAAABRGP5RMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJUGU2DCNJQGQ
.
You are receiving this because you modified the open/close state.Message
ID: @.***>

@firstaxel commented on GitHub (Dec 5, 2024): Thanks this is true please fix it On Tue, Dec 3, 2024, 2:20 PM Christophe Verclytte ***@***.***> wrote: > Same here, you might easily have a user flow that just ask for the email > and password and provide further details afterwards to limit the UX > friction. > > Maybe something like : > > export const auth = betterAuth({ > user: { > fields: { > name: { required: false } > }, > },}) > // or > export const auth = betterAuth({ > user: { > additionalFields: { > name: { required: false } // override > }, > },}) > > But it might even be preferable to get rid of the name in better-auth as > you might want to split name with first_name / last_name in your DB and > having name create an unnecessary column in the db. > > — > Reply to this email directly, view it on GitHub > <https://github.com/better-auth/better-auth/issues/424#issuecomment-2514541504>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/A5RGP2WQE7CC55MD3N32C3D2DWV2NAVCNFSM6AAAAABRGP5RMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJUGU2DCNJQGQ> > . > You are receiving this because you modified the open/close state.Message > ID: ***@***.***> >
Author
Owner

@ping-maxwell commented on GitHub (Dec 9, 2024):

Totally agree with this, in my case, I have a first_name and last_name. I don't need the name field at all.

@ping-maxwell commented on GitHub (Dec 9, 2024): Totally agree with this, in my case, I have a `first_name` and `last_name`. I don't need the `name` field at all.
Author
Owner

@zispidd commented on GitHub (Feb 13, 2025):

@Bekacru any updates on this and "image" field?

@zispidd commented on GitHub (Feb 13, 2025): @Bekacru any updates on this and "image" field?
Author
Owner

@ping-maxwell commented on GitHub (Feb 13, 2025):

There are future plans to make the fields dynamic.
Not sure when this will be a thing, but it's definitely on @Bekacru radar and apart of the plan.

@ping-maxwell commented on GitHub (Feb 13, 2025): There are future plans to make the fields dynamic. Not sure when this will be a thing, but it's definitely on @Bekacru radar and apart of the plan.
Author
Owner

@dosubot[bot] commented on GitHub (Jun 15, 2025):

Hi, @firstaxel. I'm Dosu, and I'm helping the better-auth team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You requested making the name field optional during sign-up to enhance user experience.
  • @itsderinger and @chris-verclytte support the change, suggesting configurations and discussing removing the name field entirely.
  • @ping-maxwell and others agree, noting they don't require a name field in their implementations.
  • @zispidd asked for updates, and @ping-maxwell mentioned that dynamic fields are on @Bekacru's radar for future updates.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of the better-auth repository by commenting here.
  • If no updates are provided, the issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Jun 15, 2025): Hi, @firstaxel. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You requested making the name field optional during sign-up to enhance user experience. - @itsderinger and @chris-verclytte support the change, suggesting configurations and discussing removing the name field entirely. - @ping-maxwell and others agree, noting they don't require a name field in their implementations. - @zispidd asked for updates, and @ping-maxwell mentioned that dynamic fields are on @Bekacru's radar for future updates. **Next Steps:** - Please confirm if this issue is still relevant to the latest version of the better-auth repository by commenting here. - If no updates are provided, the issue will be automatically closed in 7 days. Thank you for your understanding and contribution!
Author
Owner

@zispidd commented on GitHub (Jun 15, 2025):

still relevant

@zispidd commented on GitHub (Jun 15, 2025): still relevant
Author
Owner

@Makakusnik commented on GitHub (Jun 29, 2025):

+1
Plugins should do bare minimum but they should be opened to any adjustments.. for example emailAndPassword plugin should be only responsible for emailAndPassword i really really dont understand need of name being in there too, and image aswell but that's optional at least..

@Makakusnik commented on GitHub (Jun 29, 2025): +1 Plugins should do bare minimum but they should be opened to any adjustments.. for example emailAndPassword plugin should be only responsible for emailAndPassword i really really dont understand need of name being in there too, and image aswell but that's optional at least..
Author
Owner

@dosubot[bot] commented on GitHub (Sep 28, 2025):

Hi, @firstaxel. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested making the name field optional during sign-up to improve user experience.
  • Multiple community members supported this, suggesting configuration options or removal of the name field.
  • The maintainer acknowledged this feature is planned for future dynamic field support but has not provided a timeline.
  • The issue remains open with community consensus favoring optional or configurable name fields.

Next Steps:

  • Please let me know if this issue is still relevant to the latest version of better-auth by commenting here.
  • If I do not hear back within 7 days, this issue will be automatically closed.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Sep 28, 2025): Hi, @firstaxel. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested making the name field optional during sign-up to improve user experience. - Multiple community members supported this, suggesting configuration options or removal of the name field. - The maintainer acknowledged this feature is planned for future dynamic field support but has not provided a timeline. - The issue remains open with community consensus favoring optional or configurable name fields. **Next Steps:** - Please let me know if this issue is still relevant to the latest version of better-auth by commenting here. - If I do not hear back within 7 days, this issue will be automatically closed. Thank you for your understanding and contribution!
Author
Owner

@firstaxel commented on GitHub (Sep 28, 2025):

Still relevant it has been changed

On Sun, 28 Sept 2025, 17:03 dosubot[bot], @.***> wrote:

dosubot[bot] left a comment (better-auth/better-auth#424)
https://github.com/better-auth/better-auth/issues/424#issuecomment-3343831016

Hi, @firstaxel https://github.com/firstaxel. I'm Dosu https://dosu.dev,
and I'm helping the better-auth team manage their backlog and am marking
this issue as stale.

Issue Summary:

  • You requested making the name field optional during sign-up to
    improve user experience.
  • Multiple community members supported this, suggesting configuration
    options or removal of the name field.
  • The maintainer acknowledged this feature is planned for future
    dynamic field support but has not provided a timeline.
  • The issue remains open with community consensus favoring optional or
    configurable name fields.

Next Steps:

  • Please let me know if this issue is still relevant to the latest
    version of better-auth by commenting here.
  • If I do not hear back within 7 days, this issue will be
    automatically closed.

Thank you for your understanding and contribution!


Reply to this email directly, view it on GitHub
https://github.com/better-auth/better-auth/issues/424#issuecomment-3343831016,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A5RGP2UJBTJ5NJF6XL6ETSL3VABDNAVCNFSM6AAAAABRGP5RMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNBTHAZTCMBRGY
.
You are receiving this because you were mentioned.Message ID:
@.***>

@firstaxel commented on GitHub (Sep 28, 2025): Still relevant it has been changed On Sun, 28 Sept 2025, 17:03 dosubot[bot], ***@***.***> wrote: > *dosubot[bot]* left a comment (better-auth/better-auth#424) > <https://github.com/better-auth/better-auth/issues/424#issuecomment-3343831016> > > Hi, @firstaxel <https://github.com/firstaxel>. I'm Dosu <https://dosu.dev>, > and I'm helping the better-auth team manage their backlog and am marking > this issue as stale. > > *Issue Summary:* > > - You requested making the name field optional during sign-up to > improve user experience. > - Multiple community members supported this, suggesting configuration > options or removal of the name field. > - The maintainer acknowledged this feature is planned for future > dynamic field support but has not provided a timeline. > - The issue remains open with community consensus favoring optional or > configurable name fields. > > *Next Steps:* > > - Please let me know if this issue is still relevant to the latest > version of better-auth by commenting here. > - If I do not hear back within 7 days, this issue will be > automatically closed. > > Thank you for your understanding and contribution! > > — > Reply to this email directly, view it on GitHub > <https://github.com/better-auth/better-auth/issues/424#issuecomment-3343831016>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/A5RGP2UJBTJ5NJF6XL6ETSL3VABDNAVCNFSM6AAAAABRGP5RMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNBTHAZTCMBRGY> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Author
Owner

@firstaxel commented on GitHub (Sep 28, 2025):

I mean it hasn't been changed

On Sun, 28 Sept 2025, 17:49 Twinkle Dev, @.***> wrote:

Still relevant it has been changed

On Sun, 28 Sept 2025, 17:03 dosubot[bot], @.***>
wrote:

dosubot[bot] left a comment (better-auth/better-auth#424)
https://github.com/better-auth/better-auth/issues/424#issuecomment-3343831016

Hi, @firstaxel https://github.com/firstaxel. I'm Dosu
https://dosu.dev, and I'm helping the better-auth team manage their
backlog and am marking this issue as stale.

Issue Summary:

  • You requested making the name field optional during sign-up to
    improve user experience.
  • Multiple community members supported this, suggesting configuration
    options or removal of the name field.
  • The maintainer acknowledged this feature is planned for future
    dynamic field support but has not provided a timeline.
  • The issue remains open with community consensus favoring optional
    or configurable name fields.

Next Steps:

  • Please let me know if this issue is still relevant to the latest
    version of better-auth by commenting here.
  • If I do not hear back within 7 days, this issue will be
    automatically closed.

Thank you for your understanding and contribution!


Reply to this email directly, view it on GitHub
https://github.com/better-auth/better-auth/issues/424#issuecomment-3343831016,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A5RGP2UJBTJ5NJF6XL6ETSL3VABDNAVCNFSM6AAAAABRGP5RMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNBTHAZTCMBRGY
.
You are receiving this because you were mentioned.Message ID:
@.***>

@firstaxel commented on GitHub (Sep 28, 2025): I mean it hasn't been changed On Sun, 28 Sept 2025, 17:49 Twinkle Dev, ***@***.***> wrote: > Still relevant it has been changed > > On Sun, 28 Sept 2025, 17:03 dosubot[bot], ***@***.***> > wrote: > >> *dosubot[bot]* left a comment (better-auth/better-auth#424) >> <https://github.com/better-auth/better-auth/issues/424#issuecomment-3343831016> >> >> Hi, @firstaxel <https://github.com/firstaxel>. I'm Dosu >> <https://dosu.dev>, and I'm helping the better-auth team manage their >> backlog and am marking this issue as stale. >> >> *Issue Summary:* >> >> - You requested making the name field optional during sign-up to >> improve user experience. >> - Multiple community members supported this, suggesting configuration >> options or removal of the name field. >> - The maintainer acknowledged this feature is planned for future >> dynamic field support but has not provided a timeline. >> - The issue remains open with community consensus favoring optional >> or configurable name fields. >> >> *Next Steps:* >> >> - Please let me know if this issue is still relevant to the latest >> version of better-auth by commenting here. >> - If I do not hear back within 7 days, this issue will be >> automatically closed. >> >> Thank you for your understanding and contribution! >> >> — >> Reply to this email directly, view it on GitHub >> <https://github.com/better-auth/better-auth/issues/424#issuecomment-3343831016>, >> or unsubscribe >> <https://github.com/notifications/unsubscribe-auth/A5RGP2UJBTJ5NJF6XL6ETSL3VABDNAVCNFSM6AAAAABRGP5RMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNBTHAZTCMBRGY> >> . >> You are receiving this because you were mentioned.Message ID: >> ***@***.***> >> >
Author
Owner

@tomleidy commented on GitHub (Nov 5, 2025):

I’m really interested in this change, too. Requiring a name field when it’s "emailAndPassword" seems very strange. Looking forward to this getting implemented.

@tomleidy commented on GitHub (Nov 5, 2025): I’m really interested in this change, too. Requiring a name field when it’s "emailAndPassword" seems very strange. Looking forward to this getting implemented.
Author
Owner

@JPustkuchen commented on GitHub (Dec 3, 2025):

I agree that for man SaaS cases you don't want a "Name", but just the email address (and maybe dedicated address fields). Name should be removed here or at least be made optional / nullable and left out in the object keys.

@JPustkuchen commented on GitHub (Dec 3, 2025): I agree that for man SaaS cases you don't want a "Name", but just the email address (and maybe dedicated address fields). Name should be removed here or at least be made optional / nullable and left out in the object keys.
Author
Owner

@DNoel26 commented on GitHub (Dec 22, 2025):

Has this been changed? Before I bypassed the issue with setting name: "" but now I get the error: [body.name] Too small: expected string to have >=1 characters

@DNoel26 commented on GitHub (Dec 22, 2025): Has this been changed? Before I bypassed the issue with setting `name: ""` but now I get the error: `[body.name] Too small: expected string to have >=1 characters`
Author
Owner

@firstaxel commented on GitHub (Dec 22, 2025):

It has not been fixed

On Mon, Dec 22, 2025, 9:34 PM Darnell Noel @.***> wrote:

DNoel26 left a comment (better-auth/better-auth#424)
https://github.com/better-auth/better-auth/issues/424#issuecomment-3684075457

Has this been changed? Before I bypassed the issue with setting name: ""
but now I get the error: [body.name] Too small: expected string to have

=1 characters


Reply to this email directly, view it on GitHub
https://github.com/better-auth/better-auth/issues/424#issuecomment-3684075457,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A5RGP2VBZN36OGWWYF7K36T4DBIWNAVCNFSM6AAAAABRGP5RMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMOBUGA3TKNBVG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

@firstaxel commented on GitHub (Dec 22, 2025): It has not been fixed On Mon, Dec 22, 2025, 9:34 PM Darnell Noel ***@***.***> wrote: > *DNoel26* left a comment (better-auth/better-auth#424) > <https://github.com/better-auth/better-auth/issues/424#issuecomment-3684075457> > > Has this been changed? Before I bypassed the issue with setting name: "" > but now I get the error: [body.name] Too small: expected string to have > >=1 characters > > — > Reply to this email directly, view it on GitHub > <https://github.com/better-auth/better-auth/issues/424#issuecomment-3684075457>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/A5RGP2VBZN36OGWWYF7K36T4DBIWNAVCNFSM6AAAAABRGP5RMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMOBUGA3TKNBVG4> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Author
Owner

@DNoel26 commented on GitHub (Dec 22, 2025):

It has not been fixed

I know, that's why I passed an empty string. But as of recently I need to pass at least 1 character or I'd get the error I mentioned.

@DNoel26 commented on GitHub (Dec 22, 2025): > It has not been fixed > […](#) I know, that's why I passed an empty string. But as of recently I need to pass at least 1 character or I'd get the error I mentioned.
Author
Owner

@JE4GLE commented on GitHub (Dec 23, 2025):

@Bekacru +1 Since the empty string isn't working any more, this issue is getting more and more annoying

@JE4GLE commented on GitHub (Dec 23, 2025): @Bekacru +1 Since the empty string isn't working any more, this issue is getting more and more annoying
Author
Owner

@JE4GLE commented on GitHub (Dec 23, 2025):

I've created this temporary fix.

export const auth = betterAuth({
	databaseHooks: {
		user: {
			create: {
				before: async (user, ctx) => {
					if (ctx?.path === '/sign-up/email') {
						// Temporary fix for better-auth issue #424
						if (user.name === user.email) {
							return {
								data: {
									...user,
									name: undefined
								}
							};
						}
					}
				}
			}
		}
	}
});

Just set the name the same as the email:

authClient.signUp.email(
  {
  	name: username,
  	email: username,
  	password: password,
  }
);
@JE4GLE commented on GitHub (Dec 23, 2025): I've created this temporary fix. ```typescript export const auth = betterAuth({ databaseHooks: { user: { create: { before: async (user, ctx) => { if (ctx?.path === '/sign-up/email') { // Temporary fix for better-auth issue #424 if (user.name === user.email) { return { data: { ...user, name: undefined } }; } } } } } } }); ``` Just set the name the same as the email: ```typescript authClient.signUp.email( { name: username, email: username, password: password, } ); ```
Author
Owner

@xsevy commented on GitHub (Dec 28, 2025):

would love to see this in future release.

@xsevy commented on GitHub (Dec 28, 2025): would love to see this in future release.
Author
Owner

@switz commented on GitHub (Jan 2, 2026):

This is a silly requirement, name is not a functional requirement in all applications.

@switz commented on GitHub (Jan 2, 2026): This is a silly requirement, `name` is not a functional requirement in all applications.
Author
Owner

@Jlh77 commented on GitHub (Jan 5, 2026):

The fact that creating a user with name: "" is no longer accepted seems weird considering that you can still set name to blank when using updateUser.

Either it should be one behaviour or the other.

@Jlh77 commented on GitHub (Jan 5, 2026): The fact that creating a user with `name: ""` is no longer accepted seems weird considering that you can still set `name` to blank when using `updateUser`. Either it should be one behaviour or the other.
Author
Owner

@bytaesu commented on GitHub (Jan 6, 2026):

We’re discussing including this in the next release 🙂

@bytaesu commented on GitHub (Jan 6, 2026): We’re discussing including this in the next release 🙂
Author
Owner

@bytaesu commented on GitHub (Feb 2, 2026):

Note

We'll either find a way to do this without a breaking change or try again in a major release like v2 🙂

@bytaesu commented on GitHub (Feb 2, 2026): > [!NOTE] > We'll either find a way to do this without a breaking change or try again in a major release like v2 🙂
Author
Owner

@JPustkuchen commented on GitHub (Feb 3, 2026):

@bytaesu what's the final state here now in released code? This still looks to be completed?

@JPustkuchen commented on GitHub (Feb 3, 2026): @bytaesu what's the final state here now in released code? This still looks to be completed?
Author
Owner

@bytaesu commented on GitHub (Mar 12, 2026):

@JPustkuchen sorry for late response

We try to avoid core schema changes and only handle them in major releases like v2 when absolutely necessary, so it's not planned for now.

@bytaesu commented on GitHub (Mar 12, 2026): @JPustkuchen sorry for late response We try to avoid core schema changes and only handle them in major releases like v2 when absolutely necessary, so it's not planned for now.
Author
Owner

@JPustkuchen commented on GitHub (Mar 12, 2026):

@bytaesu thanks for the reply! As I can see you added a tag for that. I totally understand but would be great if this could be planned for the next major release then and not get closed. Thanks!

@JPustkuchen commented on GitHub (Mar 12, 2026): @bytaesu thanks for the reply! As I can see you added a tag for that. I totally understand but would be great if this could be planned for the next major release then and not get closed. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#183