Skip to content

Commit

Permalink
Don't crash on SAML logout error, log and redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
humphd committed Apr 17, 2021
1 parent f765b25 commit 802e1bd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/api/auth/src/routes/logout.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ router.get(
passport._strategy('saml').logout(req, (error, requestUrl) => {
if (error) {
logger.error({ error }, 'logout error - unable to generate logout URL');
next(createError(500, `unable to logout`));
} else {
res.redirect(requestUrl);
}
res.redirect(requestUrl);
});
} catch (error) {
logger.error({ error }, 'logout error');
Expand Down

0 comments on commit 802e1bd

Please sign in to comment.