Normally, if you add the Recaptcha elemment to a form, you need to configure your the SiteKey and SecretKey for that element. If you have a lot of forms and each form needs to add a Recaptcha element, the configuration takes a lot of time and is difficult to manage.
For CMS 11:
<add key="RecaptchaSiteKey " value="YOUR_SITE_KEY" />
"FormSamples": {
"FormSamplesApiKeyOptions": {
"AddressKey": {
"ClientApiKey": "YOUR_KEY",
"ServerApiKey": "YOUR_KEY"
},
"RecaptchaKey": {
"SiteKey": "YOUR_KEY",
"SecretKey": "YOUR_KEY"
}
}
}
Or set it in startup.cs
services.Configure<FormSamplesApiKeyOptions>(o => {
o.RecaptchaKey = new RecaptchaKey() {
SecretKey = "*****",
SiteKey = "*****"
};
});
Article is closed for comments.