This commit is contained in:
Julian Lam
2016-04-13 11:58:14 -04:00
parent 604373b5e4
commit 3390b7d7f6
2 changed files with 13 additions and 6 deletions

View File

@@ -108,6 +108,12 @@ Controllers.login = function(req, res, next) {
data.error = req.flash('error')[0];
data.title = '[[pages:login]]';
if (!data.allowLocalLogin && !data.allowRegistration && data.alternate_logins && data.authentication.length === 1) {
return helpers.redirect(res, {
external: data.authentication[0].url
});
}
res.render('login', data);
};