export const auth = (env: Env) =>
betterAuth({
database: {
dialect: new PostgresJSDialect({
postgres: getDb(env), // Call getDb() as a function to create a new connection each time
}),
// dialect,
type: "postgres",
},
emailAndPassword: {
// email and password stuff
},
secret: BETTER_AUTH_SECRET,
});
export const auth = (env: Env) =>
betterAuth({
database: {
dialect: new PostgresJSDialect({
postgres: getDb(env), // Call getDb() as a function to create a new connection each time
}),
// dialect,
type: "postgres",
},
emailAndPassword: {
// email and password stuff
},
secret: BETTER_AUTH_SECRET,
});