diff --git a/controllers/auth.js b/controllers/auth.js index 9910aa5d3..d81e604cc 100644 --- a/controllers/auth.js +++ b/controllers/auth.js @@ -77,8 +77,9 @@ exports.auth = function (aReq, aRes, aNext) { var authenticate = null; // Just in case someone tries a bad /auth/* url + // or an auth has been EOL'd if (!strategyInstances[strategy]) { - aNext(); + aRes.redirect('/login?invalidauth'); return; } diff --git a/controllers/user.js b/controllers/user.js index f4b865a46..42998b5eb 100644 --- a/controllers/user.js +++ b/controllers/user.js @@ -890,7 +890,10 @@ exports.userEditPreferencesPage = function (aReq, aRes, aNext) { return aStrategy.display; }); - options.defaultStrategy = strategies[defaultStrategy] ? strategies[defaultStrategy].name : null; + options.defaultStrategy = strategies[defaultStrategy] + ? strategies[defaultStrategy].name + : null; + options.defaultStrat = defaultStrategy; options.haveOtherStrategies = options.usedStrategies.length > 0;