Locale Validation Failed Error When Changing Language to Spanish in Universal Login
An Auth0 locale validation error occurs when a user changes the language to Spanish using the dropdown menu in Universal Login after a successful initial login request using the Latin American Spanish (es-419) locale. This happens because the dropdown menu switches the locale code from es-419 to standard Spanish (es), which fails validation if the application strictly expects es-419. To resolve this issue, either disable standard Spanish in the tenant settings or update the validation logic to accept the standard Spanish locale code.
invalid_request: Locale validation failed
- Auth0
- Universal Login
- Latin American Spanish (es-419)
- Tenant Settings
The error occurs because the language dropdown menu in Universal Login switches the locale code from es-419 to standard Spanish (es). If the application callback handler or an Auth0 Action strictly expects es-419, the application or Auth0 Action does not recognize the standard es code as a valid locale, triggering a validation failure.
What steps resolve the locale validation error?
To resolve the validation error, either disable standard Spanish in the tenant settings or update the validation logic to accept the standard Spanish locale code.
What steps disable standard Spanish in the tenant settings?
To prevent conflicts when the application strictly supports Latin American Spanish (es-419), remove the standard Spanish option in the Auth0 Dashboard by performing the following actions.
- Open the Auth0 Dashboard.
- Choose Settings, and then select General.
- Scroll to the Tenant Languages section.
- Clear the checkbox for Spanish (es).
- Ensure Spanish - Latin America (es-419) remains selected.
- Select Save.
What steps update the validation logic?
To support both standard Spanish and Latin American Spanish, modify the validation logic within the application backend or Auth0 Actions to accept the standard Spanish locale code by performing the following actions.
- Locate the locale validation logic within the application backend or Auth0 Actions.
- Update the logic to accept es as a valid locale alongside es-419.