public async Task <IActionResult> OnPost() { Input.IpAddress = httpContext?.Connection?.RemoteIpAddress?.MapToIPv4()?.ToString(); var service = new ReCaptchaService(Environment.GetEnvironmentVariable("RECAPTCHA_SECRET")); var response = await service.VerifyAsync(Input.Token, Input.IpAddress); Input.ApiResponse = Utf8Json.JsonSerializer.ToJsonString(response); return(Page()); }