react-native-recaptcha icon indicating copy to clipboard operation
react-native-recaptcha copied to clipboard

Execute not working in iPhone

Open jawadm opened this issue 5 years ago • 4 comments

I implemented an invisible Recaptcha in my app. The onReady fires for both Android and iOS but onExecute doesn't for iOS, at least on my iPhone. Is there a way to get the token with a function call?

      <ReCaptcha
        ref={ref => {
          this.recaptcha = ref;
        }}
        containerStyle={{ backgroundColor: 'transparent' }}
        siteKey={Config.RECAPTCHA_SITE_KEY}
        action="my_action"
        url={Config.RECAPTCHA_URL}
        reCaptchaType={1} 
        onReady={this.onRecaptchaReady()}
        onExecute={res => {
          this.onRecaptchaExecute(res);
        }}
      />

jawadm avatar Dec 03 '19 17:12 jawadm

@jawadm you have an error with onReady and this is why it works. In your case on ready is called on render as you are not having it as a callback function but instead calling it.

Anyhow I think I had the same problem and managed to resolve it. In my case when the captcha was loaded It opened the web view without calling onExecute.

Gould you please describe what happens and if we have the same problem I will open a pull request.

lbudakov avatar Dec 24 '19 19:12 lbudakov

I have the same problem. Neither onReady or onExecute are triggering. I'm testing on Android with react-native 0.61.5

gusoskar avatar Jan 06 '20 08:01 gusoskar

@gusoskar @jawadm @lbudakov Guys, Is anyone able to get the token? Kindly assist, if anyone able to get the token.

BajajSaajan avatar Mar 24 '22 09:03 BajajSaajan

Use this library

https://www.npmjs.com/package/react-native-secure-captcha-v3

amitmehtacode avatar May 09 '24 19:05 amitmehtacode