Edit Captcha src url
Posted: 16 Dec 2022, 18:58
Hi,
I would like to bring to your notice that we don't have a way to edit the Captcha source URL by default it using google Recaptcha but we have a concern that some countries like China don't allow google resources in order to fulfill our requirement is there a possible way or can you make it as an enhancement.
Captcha component existing code
const addRecaptchaScript = () => {
recaptchaScript.current = null;
if (!window.grecaptcha) {
let head = document.head || document.getElementsByTagName('head')[0];
let script = document.createElement('script');
script.src = 'https://www.google.com/recaptcha/api.js?render=explicit';
script.async = true;
script.defer = true;
script.onload = () => {
if (!window.grecaptcha) {
// eslint-disable-next-line no-console
console.warn('Recaptcha is not loaded');
return;
}
window.grecaptcha.ready(() => {
init();
});
};
recaptchaScript.current = script;
head.appendChild(recaptchaScript.current);
}
};
Thanking you in advance
I would like to bring to your notice that we don't have a way to edit the Captcha source URL by default it using google Recaptcha but we have a concern that some countries like China don't allow google resources in order to fulfill our requirement is there a possible way or can you make it as an enhancement.
Captcha component existing code
const addRecaptchaScript = () => {
recaptchaScript.current = null;
if (!window.grecaptcha) {
let head = document.head || document.getElementsByTagName('head')[0];
let script = document.createElement('script');
script.src = 'https://www.google.com/recaptcha/api.js?render=explicit';
script.async = true;
script.defer = true;
script.onload = () => {
if (!window.grecaptcha) {
// eslint-disable-next-line no-console
console.warn('Recaptcha is not loaded');
return;
}
window.grecaptcha.ready(() => {
init();
});
};
recaptchaScript.current = script;
head.appendChild(recaptchaScript.current);
}
};
Thanking you in advance