Skip to content

[firebase_auth] errors codes are incorrect #3921

@ollyde

Description

@ollyde

Previously we had error codes working correctly on signup/login. Now the errors codes thrown are different. We didn't know until users were complaining about it.

When was this deprecated? And why wasn't it done correctly?

Example of previous error pickup =

if (e is PlatformException) {
      if (e.code == 'ERROR_EMAIL_ALREADY_IN_USE') {
           message = lang('error_email_already_in_use');
      }
      if (e.code == 'ERROR_WEAK_PASSWORD') {
           message = 'The password was weak, try another. Perhaps longer with more special characters.';
      }
      if (e.code == 'ERROR_INVALID_EMAIL') {
           message = lang('error_invalid_email_signup');
     }
}

Now the error codes throw look like this: firebase/EMAIL_ALREADY_IN_USE

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions