1.0.4 • Published 1 year ago

react-native-secure-captcha-v3 v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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:

PropsTypeRequiredDefault ValueDescription
baseUrlstringYes''The base URL for the ReCaptcha script Must start with https://.
siteKeyV3stringYes''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

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago