GF-6, #8 Added auth.
Some checks failed
Production PR / QA Tests (pull_request) Failing after 13s

This commit is contained in:
Liviu Burcusel 2026-01-07 09:54:06 +01:00
parent e8818d6eaa
commit 10e4363cbd
Signed by: liviu
GPG key ID: 6CDB37A4AD2C610C
60 changed files with 4855 additions and 160 deletions

18
shared/utils/auth.ts Normal file
View file

@ -0,0 +1,18 @@
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { v7 as uuidv7 } from "uuid";
import db from "./db/index";
export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: "pg",
}),
advanced: {
database: {
generateId: () => uuidv7(),
},
},
emailAndPassword: {
enabled: true,
},
});