updatePassword method
Reset user password.
Requires tht the user has recently been authenticated, check User.reauthenticateWithCredential.
Throws FirebaseAuthException with following possible codes:
operation-not-allowed
- Password sign-in is disabled for this project.
user-disabled
- The user account has been disabled by an administrator.
Implementation
Future<void> updatePassword(String newPassword) async {
try {
_assertSignedOut(_auth);
await _auth._api.emailAndPasswordAccount.updatePassword(
_idToken,
newPassword: newPassword,
);
await reload();
} catch (e) {
rethrow;
}
}