


# confirmPasswordReset method




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



- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html)

[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)&lt;void> confirmPasswordReset
({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) code, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) newPassword})

_<span class="feature">override</span>_



<p>Confirms the password reset with the provided <code>newPassword</code> and <code>code</code>.</p>
<p>Throws a ConfirmPasswordResetFailureInterface if an exception occurs.</p>



## Implementation

```dart
@override
Future<void> confirmPasswordReset({
  required String code,
  required String newPassword,
}) async {
  try {
    await _firebaseAuth.confirmPasswordReset(
      code: code,
      newPassword: newPassword,
    );
  } on FirebaseAuthException catch (e) {
    throw ConfirmPasswordResetFailureFirebase.fromCode(e.code);
  } catch (_) {
    throw ConfirmPasswordResetFailureFirebase();
  }
}
```







