New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

rn-recaptcha

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-recaptcha

this is the react native component fore google recaptcha v2

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

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.

import React, {Component} from 'react';
import {StyleSheet, View} from 'react-native';
import RNRecaptcha from 'RNRecaptcha';

export default class App extends Component<Props> {
  render() {
    return (
      <View style={styles.container}>
        <RNRecaptcha siteKey={siteKey} onMessage={onMessage} url={testUrl}/>
      </View>
    );
  }
}

const siteKey='6LcWuG4UAAAAAAn1v2RHkpyaE6yaXAc-uyRDSgMG';
const testUrl = 'https://rnrecaptcha.org';

onMessage = event => {
  if ( event && event.nativeEvent.data) {
    console.log(event.nativeEvent.data)
  } else if(event.nativeEvent.data === 'expired'){
    console.log('this is when you expired')
  }else if(event.nativeEvent.data === 'error') {
    console.log('this is when error')
  } else {
    console.log('other')
  }
};


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

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.

Keywords

react

FAQs

Package last updated on 15 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts