Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion auth-oidc/node/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ if (missingEnvVars.length > 0) {
}

const SESSION_COOKIE = process.env.COOKIE_NAME || "session_token";
const ENCRYPTION_KEY = Buffer.from(process.env.COOKIE_ENCRYPTION_KEY, "base64");
let ENCRYPTION_KEY;
if(process.env.COOKIE_ENCRYPTION_KEY)
ENCRYPTION_KEY = Buffer.from(process.env.COOKIE_ENCRYPTION_KEY, "base64");
let ENCRYPTION_IV = crypto.randomBytes(16);
if (process.env.COOKIE_ENCRYPTION_IV) {
ENCRYPTION_IV = Buffer.from(process.env.COOKIE_ENCRYPTION_IV, "base64");
Expand Down