Authored by 姜枫

add third part login

... ... @@ -91,7 +91,7 @@ passport.use(new LocalStrategy({
cache.set(accountKey, accountTimes, 1800);
cache.set(ipKey, ipTimes, 3600);
//再次校验
// 再次校验
if (ipTimes >= 100) {
done('您尝试的次数过多,账号已被暂时锁定,请稍后再试', null);
} else if (accountTimes >= 10) {
... ...
... ... @@ -81,7 +81,7 @@ const Auth = {
}).catch(console.log);
},
rememberAccount(accountInfo, req, res) {
let aWeek = (new Date()).getTime() / 1000 + 504000; //504000-一周
let aWeek = (new Date()).getTime() / 1000 + 504000; // 504000-一周
let rememKey = md5(md5(accountInfo.account + accountInfo.password + accountInfo.area));
res.cookie('isRemember', true, aWeek);
... ...