express-openid-connect
Advanced tools
Comparing version 2.14.0 to 2.15.0
@@ -699,3 +699,3 @@ // Type definitions for express-openid-connect | ||
*/ | ||
genid?: (req: OpenidRequest) => string; | ||
genid?: (req: OpenidRequest) => Promise<string> | string; | ||
@@ -702,0 +702,0 @@ /** |
@@ -36,5 +36,5 @@ const { strict: assert, AssertionError } = require('assert'); | ||
function regenerateSessionStoreId(req, config) { | ||
async function regenerateSessionStoreId(req, config) { | ||
if (config.session.store) { | ||
req[REGENERATED_SESSION_ID] = config.session.genid(req); | ||
req[REGENERATED_SESSION_ID] = await config.session.genid(req); | ||
} | ||
@@ -371,3 +371,3 @@ } | ||
if (isCustomStore) { | ||
const id = existingSessionValue || generateId(req); | ||
const id = existingSessionValue || (await generateId(req)); | ||
@@ -374,0 +374,0 @@ onHeaders(res, () => |
@@ -373,3 +373,3 @@ const url = require('url'); | ||
// And regenerate the session id so the previous user wont know the new user's session id | ||
regenerateSessionStoreId(req, config); | ||
await regenerateSessionStoreId(req, config); | ||
} | ||
@@ -381,3 +381,3 @@ } else { | ||
// But update the session store id so a previous anonymous user wont know the new user's session id | ||
regenerateSessionStoreId(req, config); | ||
await regenerateSessionStoreId(req, config); | ||
} | ||
@@ -384,0 +384,0 @@ resumeSilentLogin(req, res); |
{ | ||
"name": "express-openid-connect", | ||
"version": "2.14.0", | ||
"version": "2.15.0", | ||
"description": "Express middleware to protect web applications using OpenID Connect.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/auth0/express-openid-connect", |
93385