confirmPassword method

Future<bool> confirmPassword(
  1. String confirmationCode,
  2. String newPassword
)

This is used to confirm a new password using a confirmation code

Implementation

Future<bool> confirmPassword(
    String confirmationCode, String newPassword) async {
  final paramsReq = {
    'ClientId': pool.getClientId(),
    'Username': username,
    'ConfirmationCode': confirmationCode,
    'Password': newPassword,
  };
  if (_clientSecretHash != null) {
    paramsReq['SecretHash'] = _clientSecretHash;
  }
  if (getUserContextData() != null) {
    paramsReq['UserContextData'] = getUserContextData();
  }

  await client!.request('ConfirmForgotPassword',
      await _analyticsMetadataParamsDecorator.call(paramsReq));
  return true;
}