Skip to content

ManojKanth/React-native-google-recaptchav3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React-native-google-recaptchaV3

A react native component that use the invisible reCAPTCHA v3 from Google

Features

  • Pure JS.
  • Compatible with both iOS and Android.

Tech

Installation

npm i @manojkanth/react-native-google-recaptchav3
npm i react-native-webview

Example

Import this module:

import ReCaptchaComponent from '@manojkanth/react-native-google-recaptchav3';

Use as a component:

<ReCaptchaComponent
  ref={(ref) => this._recaptchRef = ref}
  captchaDomain={'https://yourowndomain.com'}
  siteKey={'sitekey'}
  onTokenReceived={(token) => Alert.alert('CAPTCHA', token)}/>

To get new token:

this._recaptchRef.refreshToken()
Prop Type Optional Default Description
siteKey String NO none The site key provided by Google reCAPTCHA
onTokenReceived Function NO none This returns captcha token from the component
captchaDomain String NO none The url registered with Google reCAPTCHA

Development

Any suggestion is welcome.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published