react-native-secure-captcha-v3

1.0.4 • Public • Published

reCAPTCHA V3 for React Native (Android and iOS)

A lightweight and secure React Native library for seamless integration of Google ReCaptcha V3 into mobile applications. Simplify user verification and enhance security with tokenized captcha handling, ensuring a frictionless experience for your users while protecting your app from malicious activities by Amit Kumar..

Getting started

npm install react-native-secure-captcha-v3 --save

or

yarn add react-native-secure-captcha-v3

Demo


Usage

Import the RecaptchaV3 component from the package and use it in your React Native application.

import { SafeAreaView } from 'react-native';
import React from 'react';
import RecaptchaV3 from 'react-native-secure-captcha-v3';

const App = () => {
  return (
    <SafeAreaView style={styles.container}>
      <RecaptchaV3
        baseUrl={'https://yourdomain.com'}
        siteKeyV3={'YOUR_SITE_KEY'}
        onReceiveToken={token => {
          console.log('token:', token);
        }}
      />
    </SafeAreaView>
  );
};

export default App;

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
});

Props

The reCaptchaV3 component accepts the following props:

Props Type Required Default Value Description
baseUrl string Yes '' The base URL for the ReCaptcha script Must start with https://.
siteKeyV3 string Yes '' The site key for ReCaptcha V3.
onReceiveToken (token: string) => void () => {} Callback function triggered when a token is received from ReCaptcha V3.

Contributing

Contributions are welcome! Please check the contribution guidelines before submitting issues or pull requests.

License

ISC

Package Sidebar

Install

npm i react-native-secure-captcha-v3

Weekly Downloads

6

Version

1.0.4

License

ISC

Unpacked Size

6 kB

Total Files

4

Last publish

Collaborators

  • amitkumar13