export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: 'pg',
// debugLogs: true,
usePlural: true,
}),
emailAndPassword: {
enabled: true,
autoSignIn: true,
},
// emailVerification: {
// sendOnSignUp: true,
// },
logger: {
level: 'debug',
transport: {
type: 'console',
options: {
format: 'json',
},
},
},
trustedOrigins: ['https://localhost:3000'],
advanced: {
defaultCookieAttributes: {
sameSite: 'none',
secure: true,
},
},
crossSubDomainCookies: {
enabled: true,
domain: 'https://localhost:3000', // Domain with a leading period
},
});
export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: 'pg',
// debugLogs: true,
usePlural: true,
}),
emailAndPassword: {
enabled: true,
autoSignIn: true,
},
// emailVerification: {
// sendOnSignUp: true,
// },
logger: {
level: 'debug',
transport: {
type: 'console',
options: {
format: 'json',
},
},
},
trustedOrigins: ['https://localhost:3000'],
advanced: {
defaultCookieAttributes: {
sameSite: 'none',
secure: true,
},
},
crossSubDomainCookies: {
enabled: true,
domain: 'https://localhost:3000', // Domain with a leading period
},
});