@onfido/cordova-sdk
Advanced tools
Comparing version
{ | ||
"name": "@onfido/cordova-sdk", | ||
"displayName": "OnfidoCordovaSDKTest", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"types": "./types/index.d.ts", | ||
@@ -6,0 +6,0 @@ "cordova": { |
129
README.md
@@ -36,3 +36,3 @@  | ||
This SDK provides a drop-in set of screens and tools for Cordova applications to allow capturing of identity documents and face photos/live videos for the purpose of identity verification with [Onfido](https://onfido.com/). The SDK offers a number of benefits to help you create the best on-boarding/identity verification experience for your customers: | ||
This SDK provides a drop-in set of screens and tools for Cordova applications to allow the capture of identity documents and face photos/live videos for the purpose of identity verification with [Onfido](https://onfido.com/). The SDK offers a number of benefits to help you create the best onboarding/identity verification experience for your customers: | ||
@@ -59,9 +59,9 @@ * Carefully designed UI to guide your customers through the entire photo/video-capturing process | ||
In order to start integration, you will need the **API token**. You can use our [sandbox](https://documentation.onfido.com/#sandbox-testing) environment to test your integration, and you will find the API tokens inside your [Onfido Dashboard](https://onfido.com/dashboard/api/tokens). You can create API tokens inside your Onfido Dashboard as well. | ||
In order to start integration, you will need an **API token**. You can use our [sandbox](https://documentation.onfido.com/#sandbox-testing) environment to test your integration, and you will find the API tokens inside your [Onfido Dashboard](https://onfido.com/dashboard/api/tokens). You can create API tokens inside your Onfido Dashboard as well. | ||
### 2. Creating an Applicant | ||
You must create an Onfido [applicant](https://documentation.onfido.com/#applicants) before you start the flow. | ||
You must create an Onfido [Applicant](https://documentation.onfido.com/#applicants) before you start the SDK flow. | ||
For a document or face check the minimum applicant details required are `firstName` and `lastName`. | ||
For a document or face check, the minimum applicant details required are `firstName` and `lastName`. | ||
@@ -79,7 +79,7 @@ You must create applicants from your server: | ||
### 3. Configuring SDK with Tokens | ||
### 3. Configuring the SDK with Tokens | ||
You will need to generate and include a short-lived JSON Web Token (JWT) every time you initialise the SDK. | ||
To generate an SDK Token you should perform a request to the SDK Token endpoint in the Onfido API: | ||
To generate an SDK Token, you should perform a request to the SDK Token endpoint in the Onfido API: | ||
@@ -98,6 +98,6 @@ ```shell | ||
The `application_id` is the "Application ID" or "Bundle ID" that was already set up during development. | ||
* For iOS this is usually in the form of `com.your-company.app-name`. | ||
* For iOS, this is usually in the form of `com.your-company.app-name`. | ||
* To get this value manually, open xcode `ios/YourProjectName`, click on the project root, click the General tab, under Targets click your project name, and check the Bundle Identifier field. | ||
* To get this value programmatically in native iOS code, see [Stack Overflow Page](https://stackoverflow.com/questions/8873203/how-to-get-bundle-id). | ||
* For Android this is usually in the form of com.example.yourapp. | ||
* For Android, this is usually in the form of `com.example.yourapp`. | ||
* To get this file manually, you can find it in your app's `build.config`. For example, in `android/app/build.gradle`, it is the value of `applicationId`. | ||
@@ -110,3 +110,3 @@ * To get this value programmatically in native Java code, see [Stack Overflow Page](https://stackoverflow.com/questions/14705874/bundle-id-in-android). | ||
If you are starting from scratch, you can follow the [Cordova Documentation](https://cordova.apache.org/docs/en/latest/). A short instruction would lool like this: | ||
If you are starting from scratch, you can follow the [Cordova Documentation](https://cordova.apache.org/docs/en/latest/). A short instruction would look like this: | ||
@@ -139,3 +139,3 @@ 1. Install Node.js and Cordova: | ||
- Connect a device or an emulator to your computer and run the following command to deploy and test your app: `cordova run <platform>`. Replace "<platform>" with the name of the platform you want to test your app on (e.g., "android" or "ios"). | ||
- Connect a device or an emulator to your computer and run the following command to deploy and test your app: `cordova run <platform>`. Replace "platform" with the name of the platform you want to test your app on (e.g., "android" or "ios"). | ||
@@ -229,3 +229,3 @@ NOTE: You will need to download and install [Android Studio](https://developer.android.com/studio/index.html) and [Xcode](https://developer.apple.com/xcode/). | ||
Once you have an added the SDK as a dependency and you have a SDK token, you can configure the SDK: | ||
Once you have added the SDK as a dependency and you have a SDK token, you can configure the SDK: | ||
@@ -263,5 +263,5 @@ Example configuration: | ||
* Valid values in `OnfidoCountryCode`: Any ISO 3166-1 alpha-3 code. For example: `OnfidoCountryCode.USA`. | ||
* **`enableNFC`**: Optional. This toggles the ePassport NFC extraction feature. If omitted, this feature is not enabled in the flow. There is also application configuration changes needed to use this feature. To do that please follow [Onfido Developer Hub](#https://developers.onfido.com/guide/document-report-nfc#enable-nfc-in-the-onfido-sdks) | ||
* **`enableNFC`**: Optional. This toggles the ePassport NFC extraction feature. If omitted, this feature is not enabled in the flow. There are also application configuration changes needed to use this feature. To do that please follow [Onfido Developer Hub](#https://developers.onfido.com/guide/document-report-nfc#enable-nfc-in-the-onfido-sdks) | ||
* Valid values: `true`, `false`. | ||
* **`captureFace`**: Optional. This object object containing options for capture face screen. If omitted, this screen does not appear in the flow. | ||
* **`captureFace`**: Optional. This object contains options for the capture face screen. If omitted, this screen does not appear in the flow. | ||
* **`type`**: Required if captureFace is specified. | ||
@@ -286,3 +286,3 @@ * Valid values in `OnfidoCaptureType`: `PHOTO`, `VIDEO`, `MOTION`. | ||
The response will include a `face` section if `captureFace` was specified, `document` section if `captureDocument` was specified, or both sections if thery were both requested in the config. | ||
The response will include a `face` section if `captureFace` was specified, `document` section if `captureDocument` was specified, or both sections if they were both requested in the config. | ||
@@ -323,46 +323,46 @@ Example: | ||
- Arabic: ar 🇦🇪 | ||
- Armenian: hy 🇦🇲 | ||
- Bulgarian: bg 🇧🇬 | ||
- Chinese (Simplified): zh_Hans 🇨🇳 | ||
- Chinese (Traditional): zh_Hant 🇨🇳 | ||
- Croatian: hr 🇭🇷 | ||
- Czech: cs 🇨🇿 | ||
- Danish: da 🇩🇰 | ||
- Dutch: nl 🇳🇱 | ||
- English (United Kingdom): en_GB 🇬🇧 | ||
- English (United States): en_US 🇺🇸 | ||
- Estonian: et 🇪🇪 | ||
- Finnish: fi 🇫🇮 | ||
- French (Canadian): fr_CA 🇫🇷 🇨🇦 | ||
- French: fr 🇫🇷 | ||
- German: de 🇩🇪 | ||
- Greek: el 🇬🇷 | ||
- Hebrew: he 🇮🇱 | ||
- Hindi: hi 🇮🇳 | ||
- Hungarian: hu 🇭🇺 | ||
- Indonesian: id 🇮🇩 | ||
- Italian: it 🇮🇹 | ||
- Japanese: ja 🇯🇵 | ||
- Korean: ko 🇰🇷 | ||
- Latvian: lv 🇱🇻 | ||
- Lithuanian: lt 🇱🇹 | ||
- Malay: ms 🇲🇾 | ||
- Norwegian: nb 🇳🇴 | ||
- Persian: fa 🇮🇷 | ||
- Polish: pl 🇵🇱 | ||
- Portuguese (Brazil): pt_BR 🇵🇹 🇧🇷 | ||
- Portuguese: pt 🇵🇹 | ||
- Romanian: ro 🇷🇴 | ||
- Russian: ru 🇷🇺 | ||
- Serbian: sr_Latn 🇷🇸 | ||
- Slovak: sk 🇸🇰 | ||
- Slovenian: sl 🇸🇮 | ||
- Spanish (Latin America): es_419 🇪🇸 🇺🇸 | ||
- Spanish: es 🇪🇸 | ||
- Swedish: sv 🇸🇪 | ||
- Thai: th 🇹🇭 | ||
- Turkish: tr 🇹🇷 | ||
- Ukrainian: uk 🇺🇦 | ||
- Vietnamese: vi 🇻🇳 | ||
- Arabic: ar | ||
- Armenian: hy | ||
- Bulgarian: bg | ||
- Chinese (Simplified): zh_Hans | ||
- Chinese (Traditional): zh_Hant | ||
- Croatian: hr | ||
- Czech: cs | ||
- Danish: da | ||
- Dutch: nl | ||
- English (United Kingdom): en_GB | ||
- English (United States): en_US | ||
- Estonian: et | ||
- Finnish: fi | ||
- French (Canadian): fr_CA | ||
- French: fr | ||
- German: de | ||
- Greek: el | ||
- Hebrew: he | ||
- Hindi: hi | ||
- Hungarian: hu | ||
- Indonesian: id | ||
- Italian: it | ||
- Japanese: ja | ||
- Korean: ko | ||
- Latvian: lv | ||
- Lithuanian: lt | ||
- Malay: ms | ||
- Norwegian: nb | ||
- Persian: fa | ||
- Polish: pl | ||
- Portuguese (Brazil): pt_BR | ||
- Portuguese: pt | ||
- Romanian: ro | ||
- Russian: ru | ||
- Serbian: sr_Latn | ||
- Slovak: sk | ||
- Slovenian: sl | ||
- Spanish (Latin America): es_419 | ||
- Spanish: es | ||
- Swedish: sv | ||
- Thai: th | ||
- Turkish: tr | ||
- Ukrainian: uk | ||
- Vietnamese: vi | ||
@@ -380,3 +380,3 @@ However, you can add your own translations. | ||
1. Add this statement to your configuration object. | ||
1. Add this statement to your configuration object: | ||
``` | ||
@@ -399,3 +399,3 @@ localisation: { | ||
Refer to the [Authentication](https://documentation.onfido.com/#authentication) section in the API documentation for details. For testing, you should be using the sandbox, and not the live, token. | ||
Refer to the [Authentication](https://documentation.onfido.com/#authentication) section in the API documentation for details. For testing, you should be using the sandbox, and not the live token. | ||
@@ -444,4 +444,4 @@ ### 2. Creating a check | ||
Once you've added the colors.json to your project, you should add colors.json file to your xcode project as bundle resource. You can create symbolic link (rather than copy paste) to prevent redundancy. You can check out SampleApp project to see example usage. | ||
Then when running on an iOS device the values will be picked up dynamically at runtime. For Android devices to pick up the values you will need to run the following command at the same level of your `node_modules` directory. This will also be run when running the `npm --prefix node_modules/@onfido/onfido-cordova-sdk/ run updateOnfido` command. | ||
You should add the `colors.json` file to your xcode project as bundle resource. You can create symbolic link (rather than copy paste) to prevent redundancy. You can check out SampleApp project to see example usage. | ||
Then when running on an iOS device, the values will be picked up dynamically at runtime. For Android devices, to pick up the values, you will need to run the following command at the same level of your `node_modules` directory. This will also be run when running the `npm --prefix node_modules/@onfido/onfido-cordova-sdk/ run updateOnfido` command. | ||
@@ -472,3 +472,4 @@ ```shell | ||
If you see issues, you can try removing `node_modules`, build directories, and cache files. Remove the platform specific projects and try to regenerate them | ||
If you see issues, you can try removing `node_modules`, build directories, and cache files. Remove the platform specific projects and try to regenerate them. | ||
### Discrepancies between underlying Onfido native SDKs | ||
@@ -486,3 +487,3 @@ | ||
Previous version of the SDK will be supported for a month after a new major version release. Note that when the support period has expired for an SDK version, no bug fixes will be provided, but the SDK will keep functioning (until further notice). | ||
Previous versions of the SDK will be supported for a month after a new major version release. Note that when the support period has expired for an SDK version, no bug fixes will be provided, but the SDK will keep functioning (until further notice). | ||
@@ -489,0 +490,0 @@ Copyright 2023 Onfido, Ltd. All rights reserved. |
@@ -16,3 +16,3 @@ { | ||
"devDependencies": { | ||
"@onfido/cordova-sdk": "0.0.2", | ||
"@onfido/cordova-sdk": "0.0.3", | ||
"cordova-android": "^10.1.2", | ||
@@ -19,0 +19,0 @@ "cordova-ios": "^6.2.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
24
9.09%480
0.21%149930
-1.42%2286
-2.14%