


# SignInWithCredentialFailureFirebase.fromCode constructor




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



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





## Implementation

```dart
SignInWithCredentialFailureFirebase.fromCode(String code)
    : super.fromCode(code) {
  switch (code) {
    case 'account-exists-with-different-credential':
      msg = 'Account exists with different credentials.';
      break;
    case 'invalid-credential':
      msg = 'The credential received is malformed or has expired.';
      break;
    case 'operation-not-allowed':
      msg = 'Operation is not allowed. Please contact support.';
      break;
    case 'user-disabled':
      msg = 'This user has been disabled. Please contact support for help.';
      break;
    case 'user-not-found':
      msg = 'Email is not found, please create an account.';
      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.';
  }
}
```







