From 1102ca8ebb2d4c20b76b09dc01353be6e388674a Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 7 Mar 2017 14:35:38 -0500 Subject: [PATCH] fix issue where an auto-redirect to SSO on login route was failing if invoked via API call (ajaxify) --- src/controllers/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/index.js b/src/controllers/index.js index 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);