Authored by 王水玲

Merge branch 'feature/passport' into release/4.8

... ... @@ -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 Loginbad 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 Loginbad account, email:${verifyEmail} mobile:${verifyMobile}`);
... ...