v1.6.1: Sicherheit – Rate Limiting, Default-PW via Env, AUTH_SECRET Pflicht, Bcrypt 12
This commit is contained in:
+4
-1
@@ -4,7 +4,10 @@ import { SignJWT, jwtVerify } from 'jose';
|
||||
const SESSION_COOKIE_NAME = 'logbuch_session';
|
||||
const SESSION_DURATION = 60 * 60 * 1000;
|
||||
|
||||
const secretKey = process.env.AUTH_SECRET || 'logbuch-secret-change-in-production';
|
||||
const secretKey = process.env.AUTH_SECRET;
|
||||
if (!secretKey) {
|
||||
throw new Error('AUTH_SECRET Umgebungsvariable ist nicht gesetzt!');
|
||||
}
|
||||
const key = new TextEncoder().encode(secretKey);
|
||||
|
||||
export interface SessionData {
|
||||
|
||||
Reference in New Issue
Block a user