export const auth = betterAuth({
plugins: [openAPI()],
trustedOrigins: ["http://localhost:3001"],
emailAndPassword: {
enabled: true,
},
socialProviders: {
google: {
enabled: true,
prompt: "select_account",
clientId: envConfig.GOOGLE_CLIENT_ID,
clientSecret: envConfig.GOOGLE_CLIENT_SECRET,
redirectURI: `http://localhost:3001/api/auth/callback/google`,
},
},
database: drizzleAdapter(db, { provider: "sqlite", schema: authSchema }),
});
export const auth = betterAuth({
plugins: [openAPI()],
trustedOrigins: ["http://localhost:3001"],
emailAndPassword: {
enabled: true,
},
socialProviders: {
google: {
enabled: true,
prompt: "select_account",
clientId: envConfig.GOOGLE_CLIENT_ID,
clientSecret: envConfig.GOOGLE_CLIENT_SECRET,
redirectURI: `http://localhost:3001/api/auth/callback/google`,
},
},
database: drizzleAdapter(db, { provider: "sqlite", schema: authSchema }),
});