mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 21:00:41 +00:00
fix: increase max login attempts and improve two-factor token error response
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
rateLimit: {
|
||||
// Max failed login attempts before temporary lock.
|
||||
// 触发临时锁定前允许的最大登录失败次数。
|
||||
loginMaxAttempts: 5,
|
||||
loginMaxAttempts: 10,
|
||||
// Login lock duration in minutes.
|
||||
// 登录锁定时长(分钟)。
|
||||
loginLockoutMinutes: 2,
|
||||
|
||||
@@ -145,7 +145,7 @@ export async function handleToken(request: Request, env: Env): Promise<Response>
|
||||
429
|
||||
);
|
||||
}
|
||||
return twoFactorRequiredResponse();
|
||||
return identityErrorResponse('Invalid two-factor token', 'invalid_grant', 400);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user