facia-mobilesdk 0.3.9 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,2 +1,168 @@
1
- # Facia React Native SDK
1
+ <h1 align="center">Facia React Native Plugin</h1>
2
+
3
+ ## Table of contents
4
+
5
+ - [Introduction](#1-introduction)
6
+ - [Scope](#2-scope)
7
+ - [Purpose](#3-purpose)
8
+ - [Technology Stack](#4-technology-stack)
9
+ - [Supported Platform](#41-supported-platform)
10
+ - [General Requirements](#42-general-requirements)
11
+ - [Permissions](#43-permissions)
12
+ - [Development Environment Setup](#44-development-environment-setup)
13
+ - [Installation](#45-installation)
14
+ - [Development Structure](#46-development-structure)
15
+ - [Code Architecture](#47-code-architecture)
16
+ - [Branches](#48-branches)
17
+ - [Features/EndPoints](#5-features/endpoints)
18
+ - [Create Transaction API](#51-create-transaction-api)
19
+ - [Check Liveness API](#52-check-liveness-api)
20
+ - [Liveness Result API](#53-liveness-result-api)
21
+ - [Feedback API](#54-feedback-api)
22
+ - [Dependencies](#6-dependencies)
23
+ - [Environment](#7-environment)
24
+ - [Revision History](#8-revision-history)
25
+
26
+ # 1. Introduction
27
+
28
+ This is the cores React Native Plugin which provides 3D Liveness & Match to Photo ID features. This plugin captures proofs for the required feature and sends to the API to get the result.
29
+
30
+ This plugin provides two types of verification:
31
+
32
+ [//]: # (- <b>3D Liveness</b>)
33
+
34
+ [//]: # ()
35
+ [//]: # (- <b>Match to photo ID</b>)
36
+
37
+ ## 1. 3D Liveness
38
+ Facia will detect user's face and after capturing proof it will send the request to the API to check Face Liveness, this request maybe of Quick Liveness, Detailed Liveness, Additional Liveness or Default Liveness.
39
+
40
+ The SDK provides 4 types of 3D Liveness Verification:<br>
41
+ **Quick Liveness**<br>
42
+ SDK will capture a single frame after detecting the face and will send it to API for checking Liveness.<br>
43
+
44
+ **Detailed Liveness**<br>
45
+ SDK will record a video after detecting the face and will send it to API for checking Liveness.<br>
46
+
47
+ **Additional Liveness**<br>
48
+ SDK will capture a single frame and will check its liveness through API, if liveness is rejected it will move to the Additional Liveness.<br>
49
+
50
+ **Default Liveness**<br>
51
+ SDK will work as Additional liveness if the device is not rooted, if the device is rooted, it will take the user directly to the detailed liveness.
52
+
53
+ ## 2. Match to Photo ID
54
+ SDK will verify the Liveness through Quick Liveness process, if liveness will verify it will capture the document to check the Face image with the image on the document.
55
+
56
+ # 2. Scope:
57
+
58
+ The scope of this document is solely for the developer's understanding of the code structure.
59
+
60
+ # 3. Purpose
61
+
62
+ This document has been compiled to assist developers and technical experts in the integration of Facia’s API with their mobile-based platforms and applications.
63
+
64
+ This guide has been designed to explain the use of verification services and the technical processes involved in the authentication process. Users are apprised of the different kinds of verification data that is required by the API, as well as the data formats that are required to forward verification data.
65
+
66
+ # 4. Technology Stack
67
+
68
+ ## 4.1 Supported Platform
69
+
70
+ - Android 5.0 (API level 21) or higher
71
+
72
+ - iOS 11 or higher.
73
+
74
+ ## 4.2 General requirements
75
+
76
+ - Internet connection
77
+
78
+ - Supported architectures in SDK:
79
+
80
+ ## 4.3 Permissions
81
+
82
+ Only Camera permission is required by Facia to function properly.
83
+
84
+
85
+ ## 4.4 Installation
86
+
87
+ 1. To integrate React native plugin follow the integration guide [here](https://developers.facia.ai/platforms/react-sdk)
88
+
89
+
90
+ ## 4.5 Development Environment Setup:
91
+
92
+ - Visit https://reactnative.dev/docs/environment-setup
93
+
94
+ ## 4.6 Development Structure:
95
+
96
+ ![](images/react-plugin.png)
97
+
98
+ ## 4.7 Code Architecture:
99
+
100
+ The React plugin is basically a bridging between Android and IOS native SDKs into react native module. The structure followed in Android and IOS modules is MVC.
101
+
102
+ ## 4.8 Branches:
103
+
104
+ The complete details of all the branches of React Native repository can be found [here](Branches.md)
105
+
106
+ # 5. Features/EndPoints
107
+
108
+ React Native plugin does not uses any specific endpoint, instead native android and iOS modules are integrated in this plugin. So, all the endpoints in native SDKs are used in this.
109
+
110
+ ## 5.1 Create Transaction API
111
+
112
+ This is the main API of mobile application in which after capturing proofs we are submitting the proofs, this API is used for QL, DL & Photo to ID Match.
113
+ > https://app.facia.ai/backend/api/transaction/create-transaction
114
+
115
+ ## 5.2 Check Liveness API
116
+ This API is used to send the captured proofs of QL & DL in case of Additional liveness if QL is failed, basically when QL is failed in case of Additional liveness, we have to send QL' proof too with the DL proof for the session record.
117
+ > https://app.facia.ai/backend/api/transaction/check-liveness
118
+
119
+ ## 5.3 Liveness Result API
120
+ This API is used to get the result of 3D liveness request.
121
+ > https://app.facia.ai/backend/api/transaction/liveness-result
122
+
123
+ ## 5.4 Feedback API
124
+ SDK takes the user' feedback after getting the result, this API is used to submit the feedback.
125
+ > https://app.facia.ai/backend/api/transaction/create-feedback
126
+
127
+ # 6. Dependencies
128
+
129
+ No specific dependency is used in React Native plugin. Only the native SDKs are included in react native module.
130
+
131
+ # 7. Environment:
132
+
133
+ ## Local
134
+
135
+ This environment is used for development and local testing before pushing the code to live environments. In local build, the SDKs are tested by directly installing the Facia module into the real devices or emulator.
136
+
137
+ ## Production Environment:
138
+
139
+ This environment is a live environment that is used by the general public and this must be 100% bug-free.
140
+
141
+ ### How to push/live change:
142
+
143
+ - Clone or pull the project from desired git repository.
144
+
145
+ - Make the changes you want to made
146
+
147
+ - Update the version in package.json file
148
+
149
+ - Update the CHANGELOG.md file.
150
+
151
+ - Make sure to check no credentials or unnecessary logs are present in wrapper files.
152
+
153
+ - Run the "npm login" command on terminal and login using Support@facia.ai credentials.
154
+
155
+ - Publish the package on NPM using "npm publish".
156
+
157
+ - The react-native plugin is now published on npmjs.
158
+
159
+ - Now, update demo app and documentation(update history and react plugin verison). Push demo app to github and update documentation on https://developers.facia.ai/
160
+
161
+
162
+
163
+ # 8. Revision History:
164
+
165
+ SDK Versions | Changes
166
+ -------------- | --------------
167
+ 1.0.0 |React native plugin release
2
168
 
@@ -73,7 +73,7 @@ repositories {
73
73
  dependencies {
74
74
  //noinspection GradleDynamicVersion
75
75
  implementation 'com.facebook.react:react-native:+'
76
- implementation 'com.github.FaciaMobile:android-core:1.0.4' // From node_modules
76
+ implementation 'com.github.FaciaMobile:android-core:1.0.7' // From node_modules
77
77
  }
78
78
 
79
79
  def configureReactNativePom(def pom) {
@@ -1,7 +1,7 @@
1
1
  require "json"
2
2
 
3
3
  package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
- sdk_version = "1.0.8"
4
+ sdk_version = "1.0.9"
5
5
 
6
6
  Pod::Spec.new do |s|
7
7
  s.name = "facia-mobilesdk"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "facia-mobilesdk",
3
3
  "title": "React Native Mobilesdk Module",
4
- "version": "0.3.9",
4
+ "version": "0.4.0",
5
5
  "description": "Facia mobile SDK",
6
6
  "main": "index.js",
7
7
  "files": [