firebaseui-web icon indicating copy to clipboard operation
firebaseui-web copied to clipboard

Incorrect error message when password requirements not met

Open pb-jeff-oneill opened this issue 7 months ago • 3 comments

  • Operating System version: Mac OSX 13.6.2
  • Browser version: Chrome 119.0.6045.159
  • Firebase UI version: 6.1.0
  • Firebase SDK version: 10.4.0

I'm using Firebase Auth with Google Identity Platform and I recently set stricter password requirements than the defaults.

When a user goes through the password reset process and enters a password that doesn't meet the requirements, they see this message:

Try resetting your password again Your request to reset your password has expired or the link has already been used

But this error message is incorrect.

The actual HTTP response is this:

{
  "error": {
    "code": 400,
    "message": "PASSWORD_DOES_NOT_MEET_REQUIREMENTS : Missing password requirements: [Password must contain at least 8 characters, Password must contain a lower case character, Password must contain an upper case character, Password must contain a non-alphanumeric character]",
    "errors": [
      {
        "message": "PASSWORD_DOES_NOT_MEET_REQUIREMENTS : Missing password requirements: [Password must contain at least 8 characters, Password must contain a lower case character, Password must contain an upper case character, Password must contain a non-alphanumeric character]",
        "domain": "global",
        "reason": "invalid"
      }
    ]
  }
}

It looks like firebaseui-web is ignoring the content of the HTTP response and using the "expired" message for all 400 errors.

Could you please update to provide the correct error message? This is very confusing for end users.

pb-jeff-oneill avatar Nov 30 '23 16:11 pb-jeff-oneill