File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,9 @@ export class OtpService {
7272 if ( record . count >= this . RATE_LIMIT_MAX ) {
7373 const remainingMinutes = Math . ceil ( ( record . resetAt - now ) / 60000 ) ;
7474 throw new BadRequestException (
75- `Too many OTP requests. Please try again in ${ remainingMinutes } minutes.` ,
75+ this . i18n . t ( 'auth.errors.tooManyOtpRequests' , {
76+ args : { minutes : remainingMinutes } ,
77+ } ) ,
7678 ) ;
7779 }
7880
Original file line number Diff line number Diff line change 2424 "invalidVerificationCode" : " Invalid or expired verification code" ,
2525 "invalidVerificationCodeWithAttempts" : " Invalid verification code. {remaining} attempts remaining." ,
2626 "expiredVerificationCode" : " Verification code has expired" ,
27- "tooManyAttempts" : " Too many failed attempts. Please request a new code."
27+ "tooManyAttempts" : " Too many failed attempts. Please request a new code." ,
28+ "tooManyOtpRequests" : " Too many OTP requests. Please try again in {minutes} minutes."
2829 },
2930 "providers" : {
3031 "google" : " Google" ,
Original file line number Diff line number Diff line change 2424 "invalidVerificationCode" : " 验证码无效或已过期" ,
2525 "invalidVerificationCodeWithAttempts" : " 验证码无效。还剩 {remaining} 次尝试机会。" ,
2626 "expiredVerificationCode" : " 验证码已过期" ,
27- "tooManyAttempts" : " 尝试次数过多,请重新获取验证码。"
27+ "tooManyAttempts" : " 尝试次数过多,请重新获取验证码。" ,
28+ "tooManyOtpRequests" : " 验证码请求过多,请在 {minutes} 分钟后重试。"
2829 },
2930 "providers" : {
3031 "google" : " Google" ,
You can’t perform that action at this time.
0 commit comments