Auth0 Login Fails With "Too many failed codes. Wait for some minutes before retrying" Error Due to MFA OTP Rate Limit
Last Updated:
Overview
When multiple incorrect One-Time Password (OTP) submissions occur during Multi-Factor Authentication (MFA), Auth0 temporarily locks the account and displays the following error:
Too many failed codes. Wait for some minutes before retrying
Tenant logs may also show the following:
Too Many Failures (gd_otp_rate_limit_exceed)
Waiting for the lockout period to expire resolves the issue.
Applies To
- Auth0
- Multi-Factor Authentication (MFA)
- One-Time Password (OTP)
- SMS code
- Failed login
- MFA OTP rate limit
Cause
Auth0 enforces a rate limit as an expected security measure that restricts a user to 10 incorrect OTP submission attempts. After the tenth failed attempt, Auth0 temporarily locks the account to prevent brute-force attacks and displays an error message.
Solution
Resolving the MFA OTP Lockout
The lockout is temporary. Wait for the lockout period to expire to regain access.
NOTE:
- After 10 failed attempts, the user must wait at least 6 minutes before attempting to sign in again because the sustained limit is 10 per hour, which equates to 1 attempt per 6 minutes. To make another full burst of 10 requests, wait 1 hour. Refer to the Rate Limit Policy for more information.
- For OTPs sent using Email MFA, this error message can also be generated, and successful attempts are counted alongside failed attempts toward the 10-attempt limit. This behavior may change in the future to count only failed attempts.
How Can an Administrator Customize the MFA OTP Error Message?
Navigate to Prompts and modify the text for mfa-otp-enrollment-qr, key: too-many-failures, to customize the error message text. Refer to Customize Universal Login Text Elements for more details.