...
|
...
|
@@ -35,7 +35,7 @@ passport.use('local', new LocalStrategy({ |
|
|
passReqToCallback: true
|
|
|
}, (req, username, password, done) => {
|
|
|
|
|
|
let area = req.body.area || '86';
|
|
|
let area = req.body.areaCode || '86';
|
|
|
|
|
|
if (isNaN(_.parseInt(area)) || _.isEmpty(username) || _.isEmpty(password)) {
|
|
|
logger.info(`【Passport Login】bad params, area:${area} account:${username} password:${password}`);
|
...
|
...
|
@@ -43,7 +43,9 @@ passport.use('local', new LocalStrategy({ |
|
|
}
|
|
|
|
|
|
let verifyEmail = helpers.verifyEmail(username);
|
|
|
let verifyMobile = helpers.verifyAreaMobile(username, area);
|
|
|
|
|
|
// 国际号码验证取消
|
|
|
let verifyMobile = area === '86' ? helpers.verifyAreaMobile(area + '-' + username) : true;
|
|
|
|
|
|
if (!verifyEmail && !verifyMobile) {
|
|
|
logger.info(`【Passport Login】bad account, email:${verifyEmail} mobile:${verifyMobile}`);
|
...
|
...
|
|