SignIn page is not UX perfect

When I was trying to login with email + code, I put wrong code several times but it was always displaying same message
WE’RE SORRY, SOMETHING WENT WRONG

But API response was pretty clear in DevTools:
error: “invalid_user_password”
error_description: “You’ve reached the maximum number of attempts. Please try to login again.”

Hi @lonli.lokli,

Thanks for reaching out to the Auth0 Community!

I understand that the login page error messages are vague.

If you prefer, there is an option to alter these messages to tailor your needs. To do so, you will have to modify the languageDictionary object in your custom Universal Login Page.

See below for the login error messages which you can modify:

languageDictionary = {
  error: {
    login: {
      blocked_user: 'The user is blocked.',
      invalid_user_password: 'Wrong credentials.',
      invalid_captcha: 'Solve the challenge question to verify you are not a robot.',
      invalid_recaptcha: 'Select the checkbox to verify you are not a robot.',
      'lock.fallback': "We're sorry, something went wrong when attempting to log in.",
      'lock.invalid_code': 'Wrong code.',
      'lock.invalid_email_password': 'Wrong email or password.',
      'lock.invalid_username_password': 'Wrong username or password.',
      'lock.network': 'We could not reach the server. Please check your connection and try again.',
      'lock.popup_closed': 'Popup window closed. Try again.',
      'lock.unauthorized': 'Permissions were not granted. Try again.',
      'lock.mfa_registration_required': 'Multifactor authentication is required but your device is not enrolled. Please enroll it before moving on.',
      'lock.mfa_invalid_code': 'Wrong code. Please try again.',
      password_change_required: 'You need to update your password because this is the first time you are logging in, or because your password has expired.', // TODO: verify error code
      password_leaked: 'We have detected a potential security issue with this account. To protect your account, we have blocked this login. An email was sent with instruction on how to unblock your account.',
      too_many_attempts: 'Your account has been blocked after multiple consecutive login attempts.',
      too_many_requests: "We're sorry. There are too many requests right now. Please reload the page and try again. If this persists, please try again later.",
      session_missing: "Couldn't complete your authentication request. Please try again after closing all open dialogs",
      'hrd.not_matching_email': 'Please use your corporate email to login.'
    }
  }
};

See here for the complete list of languageDictionary values able to be altered with this object.

By doing so, you can have total control over the error messages.

Hoped this helps!

Please let me know if there’s anything else I can do to help.

Thank you.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.