Skip to content

Commit

Permalink
fix: logout
Browse files Browse the repository at this point in the history
  • Loading branch information
rdubigny committed Mar 22, 2024
1 parent dd56279 commit c6f7827
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ 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.idtoken = tokenSet.claims();
req.session.id_token = tokenSet.id_token;
req.session.oauth2token = tokenSet;

res.redirect("/");
Expand All @@ -129,7 +129,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.idtoken;
const id_token_hint = req.session.id_token;
req.session = null;
const client = await getMcpClient();
const redirectUrl = client.endSessionUrl({
Expand Down

0 comments on commit c6f7827

Please sign in to comment.