additionalfields
user:{
additionalFields: {
role: {
type: "string",
required: false,
defaultValue: [],
validator:{
input: z.enum(["brand", "creator", "full"]),
output: z.enum(["brand", "creator", "full"])
}
}
}
}
because this allows the definition of other roles that do not exist in the type, for example:
uthClient.updateUser({role:"error"})}
@Better Auth
additionalFields: {
role: {
type: "string",
required: false,
defaultValue: [],
validator:{
input: z.enum(["brand", "creator", "full"]),
output: z.enum(["brand", "creator", "full"])
}
}
}
}
because this allows the definition of other roles that do not exist in the type, for example:
uthClient.updateUser({role:"error"})}
@Better Auth