File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,7 @@ CLOUDFLARE_API_TOKEN=your-api-token-here
1212# Authentication
1313BETTER_AUTH_SECRET=your-better-auth-secret # see https://www.better-auth.com/docs/installation
1414BETTER_AUTH_URL=http://localhost:3000 # Base URL of your app
15+
16+ # Google Auth : see https://www.better-auth.com/docs/authentication/google
17+ GOOGLE_CLIENT_ID=your-google-client-id
18+ GOOGLE_CLIENT_SECRET=your-google-client-secret
Original file line number Diff line number Diff line change 1+ /** biome-ignore-all lint/style/noNonNullAssertion: <we will make sure it's not null> */
2+ import { betterAuth } from "better-auth" ;
3+ import { drizzleAdapter } from "better-auth/adapters/drizzle" ;
4+ import { getDb as db } from "./db" ;
5+
6+ export const auth = betterAuth ( {
7+ database : drizzleAdapter ( db , {
8+ provider : "sqlite" ,
9+ } ) ,
10+ emailAndPassword : {
11+ enabled : true ,
12+ } ,
13+ socialProviders : {
14+ google : {
15+ enabled : true ,
16+ clientId : process . env . GOOGLE_CLIENT_ID ! ,
17+ clientSecret : process . env . GOOGLE_CLIENT_SECRET ! ,
18+ } ,
19+ } ,
20+ } ) ;
You can’t perform that action at this time.
0 commit comments