From 6fc36a237998cda81779b2a80207fd502cf696e0 Mon Sep 17 00:00:00 2001 From: Simon Coe Date: Mon, 25 Sep 2023 10:27:12 +0100 Subject: [PATCH] all cookies sameSite as Strict for pkce --- authn/pkce.index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/authn/pkce.index.js b/authn/pkce.index.js index 253636f..dbd5440 100755 --- a/authn/pkce.index.js +++ b/authn/pkce.index.js @@ -185,6 +185,7 @@ function mainProcess(event, context, callback) { path: '/', httpOnly: true, secure: true, + sameSite: 'strict', maxAge: parseInt(config.SESSION_DURATION) }) }, @@ -328,14 +329,16 @@ function redirect(request, headers, callback) { "key": "Set-Cookie", "value" : cookie.serialize('NONCE', n[1], { path: '/', - httpOnly: true + httpOnly: true, + sameSite: 'strict' }) }, { "key": "Set-Cookie", "value" : cookie.serialize('CV', challenge[0], { path: '/', - httpOnly: true + httpOnly: true, + sameSite: 'strict' }) } ],