mirror of
https://github.com/Mail-0/Zero.git
synced 2026-07-01 08:16:28 +00:00
* feat: better-auth implementation * feat: added signout * feat: added conditional sign in or signout button * chore: updated sign in description * feat: added conditional log in rendering * Update example.env Co-authored-by: Praash <99237795+Praashh@users.noreply.github.com> * chore: remove param * chore: lint and format * chore: rename env example file * fixes --------- Co-authored-by: Praash <99237795+Praashh@users.noreply.github.com> Co-authored-by: Nizzy <nizabizaher@gmail.com>
16 lines
396 B
TypeScript
16 lines
396 B
TypeScript
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
|
import { betterAuth } from "better-auth";
|
|
import { db } from "@/db";
|
|
|
|
export const auth = betterAuth({
|
|
database: drizzleAdapter(db, {
|
|
provider: "pg",
|
|
}),
|
|
socialProviders: {
|
|
google: {
|
|
clientId: process.env.GOOGLE_CLIENT_ID as string,
|
|
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
|
|
},
|
|
},
|
|
});
|