Socket
Book a DemoInstallSign in
Socket

react-native-sinch-verification

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-sinch-verification

Sinch verification for react native

0.0.5
latest
Source
npmnpm
Version published
Weekly downloads
393
351.72%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-sinch-verification

Sinch Verification for react native. http://www.sinch.com

Installation

IOS

  • npm install react-native-sinch-verification
  • In the XCode's "Project navigator", right click on project name folder ➜ Add Files to <...>
  • Ensure Copy items if needed and Create groups are checked
  • Go to node_modulesreact-native-sinch-verification ➜ add SinchVerificationIOS folder
  • Add the dependency frameworks as described here (The SinchVerication.framework can be found in this package, under the SinchVericationSDK folder)

Android

  • npm install react-native-sinch-verification
  • rnpm link react-native-sinch-verification - (run npm install -g rnpm if required)
  • require the permissions as specified here

Usage

var SinchVerification = require('react-native-sinch-verification');
var custom = "A custom string to be sent to your server backend, through Sinch's callback URL";

// init with app key
SinchVerification.init('your-app-key');

// sms verification
SinchVerification.sms('your-phone-number-without-country-code', custom, (err, res) => {
  if (!err) {
      // for android, verification is done, because the sms has been read automatically
      // for ios, this means the sms has been sent out, you need to call verify with the received code
  }
});

// verify the received code (not needed on android)
SinchVerification.verify('the-received-code', (err, res) => {
  if (!err) {
      // done!
  }
});

// flash call verification (android only)
SinchVerification.flashCall('your-phone-number-without-country-code', custom, (err, res) => {
  if (!err) {
      // done!
  }
});

Keywords

sinch

FAQs

Package last updated on 09 Mar 2016

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.