Skip to content

Instantly share code, notes, and snippets.

@austincunningham
Created September 16, 2022 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save austincunningham/b57b9e13431b42a6a9a5e48957a7844e to your computer and use it in GitHub Desktop.
Save austincunningham/b57b9e13431b42a6a9a5e48957a7844e to your computer and use it in GitHub Desktop.
var TokenSet
passport.use('oidc', new Strategy({client}, (tokenSet, userinfo, done)=>{
TokenSet = tokenSet;
return done(null, tokenSet.claims());
})
)
//And on logout we can set the id_token_hint parameter
app.get('/logout', (req, res) => {
res.redirect(client.endSessionUrl({
id_token_hint: TokenSet.id_token
}
));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment