Skip to content

Commit

Permalink
fix: AC logout
Browse files Browse the repository at this point in the history
  • Loading branch information
rdubigny committed Mar 22, 2024
1 parent c6f7827 commit e330973
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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({
Expand Down

0 comments on commit e330973

Please sign in to comment.