onfido-rn-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

onfido-rn-sdk

A react-native wrapper for the onfido-ios-sdk and onfido-android-sdk identity verification SDKs.

Installation

npm install onfido-rn-sdk

Usage

Quick Start

import Onfido from 'onfido-rn-sdk';

const token = 'YOUR_SDK_TOKEN_HERE';
const options = {};
const successHandler = message => console.log(message);
const errorHandler = message => console.log(message);

Onfido.startSDK(token, options, successHandler, errorHandler);

Pre-Requisites

ios

  1. Your project must have some swift code and a bridging header in order to correctly compile the SDK. If it does not, open Xcode and add a blank .swift file and let it generate a bridging header for you. (TODO: see here)

  2. The Onfido SDK makes use of the device Camera. You will be required to have the NSCameraUsageDescription and NSMicrophoneUsageDescription keys in your application's Info.plist file:

<key>NSCameraUsageDescription</key>
<string>Required for document and facial capture</string>
<key>NSMicrophoneUsageDescription</key>
<string>Required for video capture</string>

Note: Both keys will be required for app submission.

Android

  1. Until the Onfido package is available in jcenter you will need to modify the repositories directive in your application's build.gradle:
repositories {
    maven {
        url "https://dl.bintray.com/onfido/maven"
    }
}
  1. Enable multidex by modifying the defaultConfig in your applications android/app/build.gradle:
defaultConfig {
    multiDexEnabled true
}

License

MIT

Dependents (0)

Package Sidebar

Install

npm i onfido-rn-sdk

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

90.8 kB

Total Files

34

Last publish

Collaborators

  • hughmp