Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@busfor/react-native-sms-verification-api

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@busfor/react-native-sms-verification-api

React Native module for Android automatic SMS verification with SMS retriever API

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

react-native-sms-verification-api

npm npm (tag)

Verify your users by SMS without making them deal with verification code.


Versions

1.0.x1.1.x+
Android support librariesAndroidX

Getting started

  1. Install package $ yarn add react-native-sms-verification-api

  2. Add Kotlin gradle plugin

buildscript {
	ext {
		...
		kotlinVersion = '1.3.50'
	}
	...
	dependencies {
		...
		classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${project.ext.kotlinVersion}"
	}
}

Linking

>= 0.60

Autolinking will just do the job.

< 0.60

Mostly automatic installation

$ react-native link @busfor/react-native-sms-verification-api

Manual installation

Android
  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.busfor.smsverification.RNSmsVerificationApiPackage; to the imports at the top of the file
  • Add new RNSmsVerificationApiPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':@busfor_react-native-sms-verification-api'
    	project(':@busfor_react-native-sms-verification-api').projectDir = new File(rootProject.projectDir, '../node_modules/@busfor/react-native-sms-verification-api/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      implementation project(':react-native-sms-verification-api')
    

Usage

import SmsVerificationApi from "react-native-sms-verification-api";

SmsVerificationApi.requestPhoneNumber()
  .then(phone => Alert.alert("SmsVerificationApi.requestPhoneNumber", phone))
  .catch(reason => console.log(reason));

SmsVerificationApi.startSmsRetriever();

SmsVerificationApi.addSmsListener(event => {
  Alert.alert("SmsVerificationApi.smsRetriever", event.message);
});

SmsVerificationApi.removeSmsListener();

Keywords

FAQs

Package last updated on 13 Mar 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc