react-native-andia-biometric
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

react-native-andia-biometric

Android wrapper for Andia selfie SDK

Installation

Install the npm package

npm install react-native-andia-biometric

or

yarn add react-native-andia-biometric

Usage

First, import the module:

import BiometricAndia from 'react-native-andia-biometric';

Then, launch the sdk by using the following method:

BiometricAndia.startSDK(params, successCallback, errorCallback);

where:

params:

  • apiKey: (string, Your customer API_KEY) required
  • action: (string, "onboarding" or "validation") required
  • userId: Mandatory in the validation process, this userId is returned in the onboarding of a specific user. Then when a Selfie validation is required, this is the way to validate a user against her userId. This parameter is empty when we call an onboarding a new user.

successCallback: Success callback function.

errorCallback: Error callback function.

Example - Onboarding

const successResponse = (result: any) => {
  console.log(result.message);
  setUserId(result.userId);
};

const errorResponse = (result: any) => {
  console.log(result.message);
};

const params = {
  action: 'onboarding',
  apiKey: API_KEY,
};

BiometricAndia.startSDK(params, successResponse, errorResponse);

Example - Validation

const successResponse = (result: any) => {
  console.log(result.message);
  setIsMatch(result.isMatch);
};

const errorResponse = (result: any) => {
  console.log(result.message);
};

const params = {
  action: 'validation',
  apiKey: API_KEY,
  userId: '999', //is returned in the onboarding
};

BiometricAndia.startSDK(params, successResponse, errorResponse);

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i react-native-andia-biometric

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

7.33 MB

Total Files

231

Last publish

Collaborators

  • oscar-andia