feat: add auth
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 15m8s
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 15m8s
This commit is contained in:
17
lib/auth.ts
Normal file
17
lib/auth.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { betterAuth } from "better-auth";
|
||||
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
||||
import { db } from "@/lib/db";
|
||||
import * as schema from "@/lib/schema/auth"
|
||||
|
||||
export const auth = betterAuth({
|
||||
socialProviders: {
|
||||
google: {
|
||||
clientId: process.env.GOOGLE_CLIENT_ID!,
|
||||
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
|
||||
},
|
||||
},
|
||||
database: drizzleAdapter(db, {
|
||||
provider: "pg",
|
||||
schema: schema
|
||||
})
|
||||
});
|
||||
Reference in New Issue
Block a user