|
|
@@ -104,6 +104,10 @@ module.exports = function(crowi, app) {
|
|
|
}
|
|
|
|
|
|
const externalAccount = await getOrCreateUser(req, res, next, userInfo, providerId);
|
|
|
+ if (!externalAccount) {
|
|
|
+ return loginFailure(req, res, next);
|
|
|
+ }
|
|
|
+
|
|
|
const user = await externalAccount.getPopulatedUser();
|
|
|
|
|
|
// login
|
|
|
@@ -314,10 +318,9 @@ module.exports = function(crowi, app) {
|
|
|
}
|
|
|
else {
|
|
|
req.flash('provider-DuplicatedUsernameException', providerId);
|
|
|
- return loginFailure(req, res, next);
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
- // throw err; // throw again
|
|
|
}
|
|
|
}
|
|
|
|