Skip to content

Commit

Permalink
fix: Change in logout logic
Browse files Browse the repository at this point in the history
JIRA: UUI-241
  • Loading branch information
michal-oleniacz-stp committed Jan 29, 2024
1 parent 4498240 commit 93a631a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,11 @@ app.get('/introspect', asyncMW(async (req, res, next) => {
}));

app.get('/logout', (req, res) => {
req.logout();
// Destroy the session and any possible data we might have for the user
// @see https://www.npmjs.com/package/express-session#sessiondestroycallback
req.session.destroy(() => res.redirect('/'));
req.logout(() => {
// Destroy the session and any possible data we might have for the user
// @see https://www.npmjs.com/package/express-session#sessiondestroycallback
req.session.destroy(() => res.redirect('/'));
});
});

app.get('/.well-known/apple-app-site-association', (_, res) => {
Expand Down

0 comments on commit 93a631a

Please sign in to comment.