Successfully added
...see more
- reCAPTCHA v2 | Google Developers
- Verifying the user's response | reCAPTCHA | Google Developers
- Adding CAPTCHA on form posts with ASP.NET Core 🚦 | elmah.io
- Configuring Google reCAPTCHA v3. Protecting publicly available forms is… | by Dmitry Danov | Medium
- Adding reCAPTCHA to a .NET Core Web Site | by Dmitry Danov | Medium
- How to Add Google reCAPTCHA to Your Website | ZULWeb
...see more
Signing up for reCAPTCHA can be done here: https://www.google.com/recaptcha/about/. Once signed up, you will be guided through creating a new site (reCAPTCHA v2).
In the following steps, we will need both a reCAPTCHA Site Key and Secret Key. Bot keys are found on the settings screen on the new site:
...see more
reCAPTCHA is added by including the JavaScript from Google somewhere. For ASP.NET Core add it to the Scripts
section:
@section Scripts { <script src="https://www.google.com/recaptcha/api.js" async defer></script> <partial name="_ValidationScriptsPartial" /> </script>
Next, you will need to tell reCAPTCHA where to put the CAPTCHA control. Paste the following markup inside the form
element:
<div class="form-group"> <div class="g-recaptcha" data-sitekey="SITE_KEY"></div> </div>
For the data-sitekey
attribute, use the reCAPTCHA site key from the site settings.
Referenced in:
Comments