douglasjunior / react-native-recaptcha-that-works

⚛ A reCAPTCHA bridge for React Native that works (Android and iOS)
MIT License
164 stars 33 forks source link

Unable to close the modal of Recaptcha #39

Closed SynoViren closed 1 year ago

SynoViren commented 1 year ago
  const recaptcha = useRef();
 <Recaptcha
                ref={recaptcha}
                siteKey="my site key"
                baseUrl="my url"
                onVerify={onVerify}
                onExpire={onExpire}
                size="invisible"
            /> 
const send = () => {
   recaptcha.current.open();
}

const onVerify = token => {
    console.log('success!', token);
    recaptcha.current.close();
}

Once on Verify is called. THe modal is not getting closed.

douglasjunior commented 1 year ago

It's working in the Snack Demo and others apps that I maintain.

https://snack.expo.dev/@douglasjunior/react-native-recaptcha-that-works

Btw, you dont need to call recaptcha.current.close(); on onVerify.

14850842 commented 1 year ago

I have this issue in the simulator on Expo Go but not in Expo go on the physical device.