


# UpdatePasswordFailureFirebase.fromCode constructor




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



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





## Implementation

```dart
UpdatePasswordFailureFirebase.fromCode(String code) : super.fromCode(code) {
  switch (code) {
    case 'weak-password':
      msg = 'Please enter a stronger password.';
      break;
    case 'requires-recent-login':
      msg = "User's last sign-in time does not meet the security threshold.";
      break;
    default:
      this.code = 'unknown';
      msg = 'An unknown error occurred.';
  }
}
```







