...
|
...
|
@@ -77,6 +77,13 @@ passport.use('local', new LocalStrategy({ |
|
|
cache.set(errorLoginKey, errLoginTimes).catch(() => {});
|
|
|
cache.set(accountKey, accountTimes, 1800).catch(() => {});
|
|
|
|
|
|
if (result.code === 4189) {
|
|
|
return done({
|
|
|
message: `您的密码登录错误次数过多,建议使用手机号码快捷登录或
|
|
|
<a href="${helpers.urlFormat('/passport/back/index')}" target="_blank">找回登陆密码</a>!`
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 再次校验
|
|
|
if (accountTimes >= 10) {
|
|
|
done({message: '您的账号已被暂时锁定,请稍后再试'}, null);
|
...
|
...
|
|