https://github.com/csantosm/capacitor-plugin-veriff
https://github.com/csantosm/capacitor-plugin-veriff
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/csantosm/capacitor-plugin-veriff
- Owner: CSantosM
- Created: 2022-08-27T16:15:20.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-15T19:55:07.000Z (almost 3 years ago)
- Last Synced: 2025-07-08T12:14:45.684Z (11 months ago)
- Language: TypeScript
- Size: 818 KB
- Stars: 2
- Watchers: 1
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# capacitor-plugin-veriff
[](https://www.npmjs.com/package/capacitor-plugin-veriff)
Capacitor plugin exposing the [Veriff SDK](https://www.veriff.com/) - 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
```
NSCameraUsageDescription
Veriff plugin needs camera permissions
NSMicrophoneUsageDescription
Veriff plugin needs microphone permissions
NSPhotoLibraryUsageDescription
Veriff plugin needs poto library access permissions
NFCReaderUsageDescription
Veriff plugin needs NFC permissions
```
## Install
```bash
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
```javascript
import { VeriffPlugin } from 'capacitor-plugin-veriff';
```
2. Create a [session verification](https://developers.veriff.com/#/sessions) with your Veriff API KEY.
2. Start the verification process:
We will need the verification sessionUrl to start the Veriff process
```javascript
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:
```bash
$ npm run build
```
## Bugs
- [Bug Tracker](https://github.com/CSantosM/capacitor-plugin-veriff/issues)
## API
* [`start(...)`](#start)
### start(...)
```typescript
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; }>
--------------------