diff --git a/src/routes/authentication.js b/src/routes/authentication.js index 8de1915c21..eba27b038f 100644 --- a/src/routes/authentication.js +++ b/src/routes/authentication.js @@ -103,7 +103,7 @@ Auth.reloadRoutes = async function (params) { passport.authenticate(strategy.name, { scope: strategy.scope, prompt: strategy.prompt || undefined, - state: req.session.ssoState, + state: strategy.checkState ? req.session.ssoState : undefined, })(req, res, next); }); }