Showing
1 changed file
with
7 additions
and
0 deletions
@@ -77,6 +77,13 @@ passport.use('local', new LocalStrategy({ | @@ -77,6 +77,13 @@ passport.use('local', new LocalStrategy({ | ||
77 | cache.set(errorLoginKey, errLoginTimes).catch(() => {}); | 77 | cache.set(errorLoginKey, errLoginTimes).catch(() => {}); |
78 | cache.set(accountKey, accountTimes, 1800).catch(() => {}); | 78 | cache.set(accountKey, accountTimes, 1800).catch(() => {}); |
79 | 79 | ||
80 | + if (result.code === 4189) { | ||
81 | + return done({ | ||
82 | + message: `您的密码登录错误次数过多,建议使用手机号码快捷登录或 | ||
83 | + <a href="${helpers.urlFormat('/passport/back/index')}" target="_blank">找回登陆密码</a>!` | ||
84 | + }); | ||
85 | + } | ||
86 | + | ||
80 | // 再次校验 | 87 | // 再次校验 |
81 | if (accountTimes >= 10) { | 88 | if (accountTimes >= 10) { |
82 | done({message: '您的账号已被暂时锁定,请稍后再试'}, null); | 89 | done({message: '您的账号已被暂时锁定,请稍后再试'}, null); |
-
Please register or login to post a comment