recoverPasswordWithOtp method

Future<bool> recoverPasswordWithOtp(
  1. String email,
  2. String otp,
  3. String newPassword,
  4. String confirmNewPassword,
)

Implementation

Future<bool> recoverPasswordWithOtp(String email, String otp,
    String newPassword, String confirmNewPassword) async {
  var req = await HttpRequest().httpRequest(
      HttpIntent("auth/forgot_password/confirm", {
        "email": email,
        "password": newPassword,
        "confirm_password": confirmNewPassword,
        "otp": otp
      }),
      context: context,
      method: HttpMethod.post,
      "Richiedo reset password...",
      dialog: dialog);
  if (!elaborateResponse(req)) {
    return false;
  }

  return true;
}