Home > Net >  How to add a simple recaptcha in React Native Application?
How to add a simple recaptcha in React Native Application?

Time:07-20

I make a Phone Authentication page using React-Native and thought that to store the data in firebase so, security purpose I will add a reCaptcha that who fill the reCaptcha they can click the the verify button otherwise no. But when I install this package: npm install react-native-google-recaptcha-v2, I got some error. How can I add reCaptcha ?enter image description here

CodePudding user response:

You have used npm install react-native-google-recaptcha-v2, so instead of that If you have yarn installed then you can try this yarn add react-native-google-recaptcha-v2. Basically, this library is very old so there are version conflicts while using yarn that will manage all things.

react-native-google-recaptcha-v2is a very old library so you can try https://www.npmjs.com/package/react-native-recaptcha-that-works, maybe this will work for you.

CodePudding user response:

You need to create a project with react version 16.9 and then it works with react-native-google-recaptcha-v2.

react-native-google-recaptcha-v2 lib is too old and not maintained with new React version. You can use latest one react-native-recaptcha-that-works.

You can use the latest library

react-native-recaptcha-that-works

  • Related