rn-recaptcha
this is the React native component for Google Recaptch V2
How to install
yarn add rn-recaptcha npm install rn-recaptcha
How to use
you can clone this project and check the App.js for see How to use it. or just like this.
;;; <Props> { return <View style=stylescontainer> <RNRecaptcha siteKey=siteKey onMessage=onMessage url=testUrl/> </View> ; } const siteKey='6LcWuG4UAAAAAAn1v2RHkpyaE6yaXAc-uyRDSgMG';const testUrl = 'https://rnrecaptcha.org'; { if event && eventnativeEventdata console else ifeventnativeEventdata === 'expired' console else ifeventnativeEventdata === 'error' console else console }; const styles = StyleSheet;
siteKey is the siteKey of the Google Recaptcha
testUrl is the url Domain defined on your google Recaptcha
onMessage is the callback function which will be called after the google verification.
Demo
there is RN Project Demo you can check: Demo
Any Suggestion or Questions, please contact me.