title: ReCaptcha V3 - what to do if validation failed?
body: <p>I have added invisible reCaptcha V3 to asp.net core 6.0 Angular SPA.</p>
  <ol>
  <li>Registration MVC page HTML:</li>
  </ol>
  <pre><code>  . . .
    &lt;input type=&quot;hidden&quot; name=&quot;captcha&quot; id=&quot;captchaInput&quot; value=&quot;&quot; /&gt;
  &lt;/form&gt;
  
  . . .
  
  @section Scripts {
      &lt;script src=&quot;https://www.google.com/recaptcha/api.js?render=@Configuration[&quot;Recaptcha:siteKey&quot;]&quot;&gt;&lt;/script&gt;
      &lt;script&gt;
          grecaptcha.ready(function() {
              grecaptcha.execute('@Configuration[&quot;Recaptcha:siteKey&quot;]', { action: 'contact' }).then(function (token) {
                  $(&quot;#captchaInput&quot;).val(token);
              });
          });
      &lt;/script&gt;
  
      &lt;partial name=&quot;_ValidationScriptsPartial&quot; /&gt;
  }
  </code></pre>
  <p>CS</p>
  <pre><code>if (ModelState.IsValid)
  {
    if (!await _captchaValidator.IsCaptchaPassedAsync(captcha))
      ModelState.AddModelError(&quot;captcha&quot;, &quot;Captcha validation failed&quot;);
  </code></pre>
  <p>There is OIDC controller with reCaptcha validator injected.</p>
  <p>Everything is working. Until the validation fails (for example low score).</p>
  <p><strong>User cannot proceed forward from this point.</strong></p>
  <p><strong>I would expect captcha to become regular visible challenge.</strong></p>
  <p><strong>I need a workable solution - how to give a user second chance to prove they arent a robot in case when reCaptcha v3 validation failed (for whatever reason).</strong></p>
  <p><em>credits to: <a href="https://github.com/Jarda29/GoogleReCaptcha.V3" rel="nofollow noreferrer">https://github.com/Jarda29/GoogleReCaptcha.V3</a></em></p>