v3: code quality pass, various bug fixes
This commit is contained in:
@@ -8,8 +8,13 @@ import {
|
||||
isInvitePayload,
|
||||
} from "../model/interfaces.ts";
|
||||
|
||||
const JWT_SECRET = "FIXME-gerbeur-dev-env";
|
||||
const JWT_KEY = new TextEncoder().encode(JWT_SECRET);
|
||||
const jwtSecret = Deno.env.get("JWT_SECRET");
|
||||
if (!jwtSecret) {
|
||||
throw new Error(
|
||||
"JWT_SECRET environment variable is required. Generate one with: openssl rand -hex 32",
|
||||
);
|
||||
}
|
||||
const JWT_KEY = new TextEncoder().encode(jwtSecret);
|
||||
|
||||
// ── Invite tokens ─────────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user