mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 10:06:13 +01:00
fix issue where an auto-redirect to SSO on login route was failing if invoked via API call (ajaxify)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user