dozoisch/react-google-recaptcha

"recaptcha/api.js?onload=onloadcallback&render=explicit" Failed to load then `onErrored ` won't trigger

ruoduan-hub opened this issue ยท 2 comments

react-google-recaptcha version: ^2.1.0
react-async-script version: ^18.0.0

  • If "API ๐Ÿ‘‰๐Ÿป recaptcha/api.js " cannot be obtained due to network reasons, "onErrored" will have no effect, which obviously exceeds the expectation of "onErrored"

Hi ,any update on this

This occurred for me

image

I did:


import ReCAPTCHA from "react-google-recaptcha"


function onChange(value) {
        console.log("Captcha value:", value);
      }
      
      
      <ReCAPTCHA sitekey={process.env.REACT_APP_SITE_KEY} onChange={onChange} />

I tried hitting 'https://recaptcha.net/recaptcha/api.js?render=6LfZw9AlAAAAAJ5J2DxO3Ss-oP0lfB9xqI5NaHGF' but did not got any response. Same with 'https://www.google.com/recaptcha/api.js?render=6LfZw9AlAAAAAJ5J2DxO3Ss-oP0lfB9xqI5NaHGF'

Seems like URL is not correct, Would be helpful if anyone can make a jQuery POC for recaptcha, check under network and see which URL google recaptcha API is hitting.

Then I can assist in making a new package.