feat: add auth
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 15m8s

This commit is contained in:
2025-10-01 17:16:58 +07:00
parent 21b2e0ae6e
commit 018a980dcb
13 changed files with 3057 additions and 164 deletions

17
lib/auth.ts Normal file
View 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
})
});