...
|
...
|
@@ -66,7 +66,19 @@ function doPassportCallback(req, res, user) { |
|
|
refer: refer
|
|
|
});
|
|
|
} else if (result.data['is_bind'] === 'Y' && result.data.uid) {//eslint-disable-line
|
|
|
return loginService.syncUserSession(result.data.uid, req, res, result.data.session_key).then(() => {
|
|
|
|
|
|
let uid = {
|
|
|
toString() {
|
|
|
return this.uid;
|
|
|
},
|
|
|
uid: result.data.uid,
|
|
|
sessionKey: result.data.session_key,
|
|
|
isValid() {
|
|
|
return this.uid && this.sessionKey;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
return loginService.syncUserSession(uid, req, res, result.data.session_key).then(() => {
|
|
|
return refer;
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -118,6 +130,10 @@ const local = { |
|
|
domain: config.cookieDomain
|
|
|
});
|
|
|
|
|
|
res.clearCookie('_SESSION_KEY', {
|
|
|
domain: config.cookieDomain
|
|
|
});
|
|
|
|
|
|
let bindMobile = _.trim(req.query.bindMobile || '');
|
|
|
let bindArea = '+' + _.trim(req.query.bindArea || '86');
|
|
|
let areaArr = PassportHelper.getCountry();
|
...
|
...
|
|