fix issue where an auto-redirect to SSO on login route was failing if invoked via API call (ajaxify)

v1.18.x
Julian Lam 8 years ago
parent 8a123f7c1c
commit 1102ca8ebb

@ -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);

Loading…
Cancel
Save