From e3309730a0acacebcc760a8dab2bb8864cbfcde0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Dubigny?= Date: Fri, 22 Mar 2024 19:15:30 +0100 Subject: [PATCH] fix: AC logout --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 0a59bef..8cd9559 100644 --- a/index.js +++ b/index.js @@ -118,8 +118,9 @@ app.get(process.env.CALLBACK_URL, async (req, res, next) => { req.session.nonce = null; req.session.state = null; req.session.userinfo = await client.userinfo(tokenSet.access_token); - req.session.id_token = tokenSet.id_token; + req.session.idtoken = tokenSet.claims(); req.session.oauth2token = tokenSet; + req.session.id_token_hint = tokenSet.id_token; res.redirect("/"); } catch (e) { @@ -129,7 +130,7 @@ app.get(process.env.CALLBACK_URL, async (req, res, next) => { app.post("/logout", async (req, res, next) => { try { - const id_token_hint = req.session.id_token; + const id_token_hint = req.session.id_token_hint; req.session = null; const client = await getMcpClient(); const redirectUrl = client.endSessionUrl({