How to Set up Google reCAPTCHA | reCAPTCHA in NopCommerce
Google reCAPTCHA is a free service from Google that helps protect websites from fraudulent form submissions and bots. Follow these simple steps to set up Google reCAPTCHA for your site.
Sign up for an API key pair for your site. Click here to start the process. or simply search on google: google captcha admin console
Select 'Admin Console' admin console
login with your Gmail account credentials
Click on the plus sign button and configure with project domain
Type your website URL
Select reCAPTCHA v2
Enter your website's URL under 'Domains'
Enter emails of the administrators
Accept reCAPTCHA Terms of Service
- Submit the form. Your API keys will be generated.
In this way, we can configure the captcha.
Now we will see how we can Add Recaptcha in NopCommerce 4.3.
log in as Admin.
Go to Cnfoguration->General settings-> Enable Captcha .
Once you will enable it, some more fields will be there, and from there we can choose Recaptcha type v2 or v3 according to our need.
At Last we just configure the public and secret keys in that section and have to select the pages where we want to configure the Recaptcha for validation like in login, register, contact us, etc page.
No need to write a single line of code. because in NopCommerce the captcha plugin is already installed.
And after all settings, we can see the captcha on our page. Here we have implemented Recaptcha v2
On login, if you will not tick to the I'm not robot, we get the below error