Edit Captcha src url

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
Harsha Bulusu
Posts: 6
Joined: 02 Dec 2022, 14:41

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

habubey
Posts: 89
Joined: 24 Aug 2022, 13:17

20 Dec 2022, 08:25

Hey there,
Thank you so much for the sample we will consider it.
Best
Bugra Beyduz
PrimeReact Core Developer
Github profile: https://github.com/habubey

Harsha Bulusu
Posts: 6
Joined: 02 Dec 2022, 14:41

21 Dec 2022, 11:29

Thanks for considering this is there any alternative is there a possibility for extending your component to override a method for editing src url

wish79
Posts: 14
Joined: 27 Apr 2017, 09:35

02 Jan 2023, 14:26

Why we need primereact captcha tag to give us the ability to change the google url, because in some country the google url blocked so google provide another url which is accessible in theses countries

read this doc from google can-i-use-recaptcha-globally https://developers.google.com/recaptcha ... -globally ,

so our request how can i change the google captcha url in primereact Tag

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

27 Jan 2023, 14:18

Hi,

This is not related to Apollo. Please use github or PrimeReact forum. Thanks a lot for your understanding!

Best Regards,

Post Reply

Return to “Apollo - PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests