export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: "pg",
schema: authSchema
}),
basePath: "/auth",
trustedOrigins: ['*'],
emailAndPassword: {
enabled: true,
},
user: {
additionalFields: {
userType: {
type: "string",
required: false,
returned: true,
defaultValue: UserType.CUSTOMER,
},
},
},
plugins: [
openAPI(),
organization(),
],
});
export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: "pg",
schema: authSchema
}),
basePath: "/auth",
trustedOrigins: ['*'],
emailAndPassword: {
enabled: true,
},
user: {
additionalFields: {
userType: {
type: "string",
required: false,
returned: true,
defaultValue: UserType.CUSTOMER,
},
},
},
plugins: [
openAPI(),
organization(),
],
});