...
|
...
|
@@ -30,7 +30,10 @@ const signin = (type, area, profile, password, shoppingKey, clientIp) => { |
|
|
return loginBy[type](area, profile, password, shoppingKey, clientIp);
|
|
|
};
|
|
|
|
|
|
const syncUserSession = (uid, req, res, sessionKey) => {
|
|
|
const syncUserSession = (user, req, res) => {
|
|
|
let uid = user.uid;
|
|
|
let sessionKey = user.session_key;
|
|
|
|
|
|
if (sessionKey) {
|
|
|
cache.set(`java_session_key:${uid}`, sessionKey).catch(() => {
|
|
|
logger.error('write session key fail');
|
...
|
...
|
@@ -97,6 +100,14 @@ const syncUserSession = (uid, req, res, sessionKey) => { |
|
|
httpOnly: true
|
|
|
});
|
|
|
|
|
|
if (user.canSkip && user.token) {
|
|
|
res.cookie('canSkip', user.canSkip, {
|
|
|
domain: config.cookieDomain
|
|
|
});
|
|
|
res.cookie('CSToken', user.token, {
|
|
|
domain: config.cookieDomain
|
|
|
});
|
|
|
}
|
|
|
if (isTipCert && isTipCert.code === 200 && isTipCert.data) {
|
|
|
return isTipCert.data.isNeedPopupRelated === 'Y';
|
|
|
}
|
...
|
...
|
|