feat(api): Better-Auth integration — sessions, auth middleware, staff resolution, RBAC tests (GRO-118) #136

Merged
groombook-engineer[bot] merged 24 commits from feature/gro-118-better-auth into main 2026-03-28 03:50:45 +00:00
2 changed files with 7 additions and 1 deletions
Showing only changes of commit 1c44509867 - Show all commits
+6
View File
@@ -9,6 +9,12 @@ const OIDC_CLIENT_SECRET = process.env.OIDC_CLIENT_SECRET;
const BETTER_AUTH_SECRET = process.env.BETTER_AUTH_SECRET;
const BETTER_AUTH_URL = process.env.BETTER_AUTH_URL ?? "http://localhost:3000";
if (!BETTER_AUTH_SECRET && process.env.AUTH_DISABLED !== "true") {
throw new Error(
"[FATAL] BETTER_AUTH_SECRET environment variable is required when auth is enabled"
);
}
export const auth = betterAuth({
database: drizzleAdapter(getDb(), {
provider: "pg",
+1 -1
View File
@@ -136,7 +136,7 @@ importers:
specifier: ^26.1.0
version: 26.1.0
typescript:
specifier: ^5.9.3
specifier: ^5.7.3
version: 5.9.3
typescript-eslint:
specifier: ^8.20.0