[Closes #8] Added authentication
Some checks failed
Production Build and Deploy / Build (push) Failing after 44s
Production Build and Deploy / Deploy (push) Has been skipped

This commit is contained in:
Liviu Burcusel 2026-01-07 11:11:35 +01:00
parent 6eefa137bb
commit 97211cdccd
Signed by: liviu
GPG key ID: 6CDB37A4AD2C610C
65 changed files with 5831 additions and 440 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,
},
});