export const authOptions: BetterAuthOptions = {
database: drizzleAdapter(
{},
{
provider: 'pg',
schema: betterAuthSchema,
},
),
emailAndPassword: {
enabled: true,
requireEmailVerification: true,
},
emailVerification: {
sendVerificationEmail: (_, _request) => {
// TODO: Implement email sending logic
console.log('Sending verification email');
return Promise.resolve();
},
},
account: {
accountLinking: {
enabled: true,
},
},
user: {
deleteUser: {
enabled: true,
},
},
socialProviders: {
github: {
clientId: '',
clientSecret: '',
},
},
advanced: {
defaultCookieAttributes: {
secure: true,
sameSite: 'none',
},
},
plugins: [admin()],
};
export const authOptions: BetterAuthOptions = {
database: drizzleAdapter(
{},
{
provider: 'pg',
schema: betterAuthSchema,
},
),
emailAndPassword: {
enabled: true,
requireEmailVerification: true,
},
emailVerification: {
sendVerificationEmail: (_, _request) => {
// TODO: Implement email sending logic
console.log('Sending verification email');
return Promise.resolve();
},
},
account: {
accountLinking: {
enabled: true,
},
},
user: {
deleteUser: {
enabled: true,
},
},
socialProviders: {
github: {
clientId: '',
clientSecret: '',
},
},
advanced: {
defaultCookieAttributes: {
secure: true,
sameSite: 'none',
},
},
plugins: [admin()],
};