mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 00:51:20 +00:00
fix(backend): guard against missing BETTER_AUTH_SECRET
Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user