From 7da3a4a15d2efcd1dbf179019e24164c7d17466e Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Wed, 1 May 2024 09:17:47 +1000 Subject: [PATCH] chore: use latest TS version --- package.json | 2 +- src/session/sessionManager.js | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index a1dee2b..93630b3 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ }, "dependencies": { "@babel/preset-env": "^7.23.9", - "@kinde-oss/kinde-typescript-sdk": "^2.8.0", + "@kinde-oss/kinde-typescript-sdk": "2.9.0", "cookie": "^0.6.0", "crypto-js": "^4.1.1", "jwt-decode": "^3.1.2", diff --git a/src/session/sessionManager.js b/src/session/sessionManager.js index 3f23a26..fb496e6 100644 --- a/src/session/sessionManager.js +++ b/src/session/sessionManager.js @@ -175,12 +175,14 @@ export const pageRouterSessionManager = (req, res) => { ]); }, destroySession: () => { - res?.setHeader('Set-Cookie', [ ...COOKIE_LIST.map((name) => - cookie.serialize(name, '', { - domain: config.cookieDomain ? config.cookieDomain : undefined, - maxAge: -1, - ...GLOBAL_COOKIE_OPTIONS - })) + res?.setHeader('Set-Cookie', [ + ...COOKIE_LIST.map((name) => + cookie.serialize(name, '', { + domain: config.cookieDomain ? config.cookieDomain : undefined, + maxAge: -1, + ...GLOBAL_COOKIE_OPTIONS + }) + ) ]); } };