confirmResetPassword method

Future<UpdatePasswordResult> confirmResetPassword({
  1. required String username,
  2. required String newPassword,
  3. required String confirmationCode,
  4. ConfirmResetPasswordOptions? options,
})

Completes the password reset process given a username, new password, and confirmation code.

The username is a login identifier or an email/phone number, depending on the configuration.

Optionally accepts plugin-specific, advanced options for the request.

Implementation

Future<UpdatePasswordResult> confirmResetPassword({
  required String username,
  required String newPassword,
  required String confirmationCode,
  ConfirmResetPasswordOptions? options,
}) {
  var request = ConfirmResetPasswordRequest(
      username: username,
      newPassword: newPassword,
      confirmationCode: confirmationCode,
      options: options);
  return plugins.length == 1
      ? plugins[0].confirmResetPassword(request: request)
      : throw _pluginNotAddedException('Auth');
}