feat(throttling): add global rate limit lockout flow

This commit is contained in:
2026-04-30 15:25:45 +03:30
parent 2772b36447
commit e635fd9c2c
10 changed files with 901 additions and 279 deletions

View File

@@ -52,6 +52,15 @@ export const en = {
invalidCreds: "Invalid credentials",
enterOtp: "Please enter the OTP code",
invalidOtp: "Invalid OTP code"
},
throttle: {
title: "Too many attempts",
genericMessage: (time: string) => `Too many requests. Try again in ${time}.`,
otpSendMessage: (time: string) => `Too many OTP requests. Try again in ${time}.`,
passwordLoginMessage: (time: string) => `Too many password login attempts. Try again in ${time}.`,
otpLoginMessage: (time: string) => `Too many OTP login attempts. Try again in ${time}.`,
countdownLabel: (time: string) => `Retry in ${time}`,
fallback: "Too many requests. Please wait and try again.",
}
},
@@ -61,6 +70,18 @@ export const en = {
suffix: ""
},
rateLimit: {
eyebrow: "Request limit reached",
title: "Please wait before trying again",
message: "You have sent too many requests. Access is temporarily locked until the cooldown finishes.",
cooldownLabel: "Cooldown",
waitingMessage: (time: string) => `Requests are blocked for now.`,
finishedMessage: "The cooldown has finished. You can continue now.",
continue: "Continue",
continueCooldown: (time: string) => `Continue in ${time}`,
ready: "Ready",
},
terms: {
back: "Back",
title: "Terms of Service and Privacy Policy",