Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
How to add custom fields on Sign-up? - Better Auth
BA
Better Auth
•
8mo ago
•
3 replies
commodore
How to add custom fields on Sign-up?
How do you add custom fields to client side functions like sign
-up
?
I am working on a sign
-up form in nextjs app router and I have better
-auth working with the basic email
, password
, name
, etc
. fields using
:
const
{ data
}
= await authClient
.signUp
.email
(
{
email
: formData
.email
,
password
: formData
.password
,
name
:
$
{formData
.firstName
}
$
{formData
.lastName
}
,
callbackURL
:
"
/dashboard
"
,
}
)
;
However I want to add some custom fields for example
"practiceName
"
, and
"role
"
:
user
:
{
additionalFields
:
{
practiceName
:
{
type
:
"string
"
,
required
: false
,
}
,
firstName
:
{
type
:
"string
"
,
required
: true
,
}
,
lastName
:
{
type
:
"string
"
,
required
: true
,
}
,
role
:
{
type
:
"string
"
,
required
: false
,
defaultValue
:
"user
"
,
input
: false
,
/
/ don
't allow user to set role
}
,
}
,
}
,
I have found a way to do this on the server side
:
https://www.better-auth.com/docs/concepts/database#extending-core-schema
But the same logic doesn
't seem to work for auth
-client side
.
So my question is how do I add additional custom fields on the client side
? Or is it only possible on the server side
?
Any help is appreciated
!
Database | Better Auth
Learn how to use a database with Better Auth
.
Solution
https://www.better-auth.com/docs/concepts/typescript#inferring-additional-fields-on-client
TypeScript | Better Auth
Better Auth TypeScript integration
.
Jump to solution
Better Auth
Join
9,988
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Was this page helpful?
Yes
No
Similar Threads
Similar Threads
Sending additional custom fields on sign-up.
BA
Better Auth / help
4mo ago
How to extend Sing-in & Sign-up body with custom fields?
BA
Better Auth / help
10mo ago
Custom sign up
BA
Better Auth / help
14mo ago
Custom fields with Magic Links/Social Sign Up
BA
Better Auth / help
7mo ago