


# ReauthenticateFailureFirebase.fromCode constructor




    *[<Null safety>](https://dart.dev/null-safety)*



ReauthenticateFailureFirebase.fromCode([String](https://api.flutter.dev/flutter/dart-core/String-class.html) code)





## Implementation

```dart
ReauthenticateFailureFirebase.fromCode(String code) : super.fromCode(code) {
  switch (code) {
    case 'user-mismatch':
      msg = 'Given credential does not correspond to the user.';
      break;
    case 'user-not-found':
      msg = 'User is not found, please create an account.';
      break;
    case 'invalid-credential':
      msg = 'The credential received is malformed or has expired.';
      break;
    case 'invalid-email':
      msg = 'Email is not valid or badly formatted.';
      break;
    case 'wrong-password':
      msg = 'Incorrect password, please try again.';
      break;
    case 'invalid-verification-code':
      msg = 'The credential verification code received is invalid.';
      break;
    case 'invalid-verification-id':
      msg = 'The credential verification ID received is invalid.';
      break;
    default:
      this.code = 'unknown';
      msg = 'An unknown error occurred.';
  }
}
```







