14 lines
358 B
TypeScript
14 lines
358 B
TypeScript
export function getSessionPepper(): string {
|
|
const secret = process.env.SESSION_SECRET;
|
|
if (!secret || secret.length < 16) {
|
|
throw new Error(
|
|
"SESSION_SECRET must be set (min 16 characters) for auth routes.",
|
|
);
|
|
}
|
|
return secret;
|
|
}
|
|
|
|
export function isDatabaseConfigured(): boolean {
|
|
return Boolean(process.env.DATABASE_URL?.trim());
|
|
}
|