Node.js based forum software built for the modern web
fix issue where an auto-redirect to SSO on login route was failing if invoked via API call (ajaxify)
Julian Lam1102ca8ebb2d
diff --git a/src/controllers/index.js b/src/controllers/index.jsindex a3b9361651..93b8e9a383 100644--- a/src/controllers/index.js+++ b/src/controllers/index.js@@ -131,7 +131,7 @@ Controllers.login = function (req, res, next) {if (!data.allowLocalLogin && !data.allowRegistration && data.alternate_logins && data.authentication.length === 1) {if (res.locals.isAPI) {return helpers.redirect(res, {- external: data.authentication[0].url,+ external: nconf.get('relative_path') + data.authentication[0].url,});}return res.redirect(nconf.get('relative_path') + data.authentication[0].url);