...
|
...
|
@@ -34,7 +34,7 @@ passport.use(new LocalStrategy({ |
|
|
}, (req, username, password, done) => {
|
|
|
|
|
|
let area = req.body.areaCode || '86';
|
|
|
let ip = req.ip || '';
|
|
|
let clientIp = req.yoho.clientIp || '';
|
|
|
|
|
|
if (isNaN(parseInt(area, 0)) || _.isEmpty(username) || _.isEmpty(password)) {
|
|
|
logger.info(`【Passport Login】bad params, area:${area} account:${username} password:${password}`);
|
...
|
...
|
@@ -65,7 +65,7 @@ passport.use(new LocalStrategy({ |
|
|
|
|
|
let shoppingKey = cookie.getShoppingKey(req);
|
|
|
|
|
|
AuthHelper.signinAes(area, username, password, shoppingKey, ip).then((result) => {
|
|
|
AuthHelper.signinAes(area, username, password, shoppingKey, clientIp).then((result) => {
|
|
|
if (result.code && result.code === 200 && result.data.uid) {
|
|
|
done(null, result.data);
|
|
|
} else {
|
...
|
...
|
|