fix(backend): guard against missing BETTER_AUTH_SECRET

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-03-16 22:37:39 +00:00
parent 36bdf7e1bb
commit 0f912012d6

View File

@@ -7,6 +7,10 @@ import type { Database } from "../db/index.ts"
import * as schema from "../db/schema.ts"
export function createAuth(db: Database) {
if (!process.env.BETTER_AUTH_SECRET) {
throw new Error("BETTER_AUTH_SECRET is not set")
}
return betterAuth({
database: drizzleAdapter(db, {
provider: "pg",