Skip to content

CSantosM/capacitor-plugin-veriff

Repository files navigation

capacitor-plugin-veriff

npm version

Capacitor plugin exposing the Veriff SDK - Smart and scalable identity verification

Integration

Android

Add the maven repository to the android/build.gradle application file:

allprojects {
    repositories {
		// make sure to add this before other repos
		maven { url "https://cdn.veriff.me/android/" } // <------------ ADD THIS LINE

        google()
        ...
    }
}

iOS

add the required permissions in your Info.plist file

<key>NSCameraUsageDescription</key>
<string>Veriff plugin needs camera permissions</string>
<key>NSMicrophoneUsageDescription</key>
<string>Veriff plugin needs microphone permissions</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Veriff plugin needs poto library access permissions</string>
<key>NFCReaderUsageDescription</key>
<string>Veriff plugin needs NFC permissions</string>

Install

npm install capacitor-plugin-veriff
npx cap sync

The plugin exposes the VERIFF JavaScript namespace which cointains a Veriff end-to-end verification service.

To use this plugin:

In your ionic app:

  1. Import the VeriffPlugin in your ionic app
import { VeriffPlugin } from 'capacitor-plugin-veriff';
  1. Create a session verification with your Veriff API KEY.

  2. Start the verification process:

We will need the verification sessionUrl to start the Veriff process

const sessionUrl = session.verification.url;
const configuration = {
  themeColor: '#0F3C32'
};

const options = {sessionUrl, configuration};
try {
	const result = await VeriffPlugin.start(options);
	  // The promise returns the VeriffSDK verification result
	  console.log("Result: ", result);
} catch(error) {
	console.error('Error starting Veriff ', error)
}

Building

Within root plugin path:

$ npm run build

Bugs

API

start(...)

start(params: { sessionUrl: string; configuration: { themeColor: string; }; }) => Promise<{ message: string; status: string; }>
Param Type
params { sessionUrl: string; configuration: { themeColor: string; }; }

Returns: Promise<{ message: string; status: string; }>


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published