@getyoti/react-face-capture 1.2.0 → 1.3.1-test.1
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/CHANGELOG.md +25 -0
- package/README.md +23 -10
- package/index.css +1 -1
- package/index.d.ts +11 -0
- package/index.js +1 -1
- package/package.json +3 -4
- package/vanilla/index.css +1 -1
- package/vanilla/index.js +1 -1
- package/vanilla/index.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## v1.3.0
|
|
4
|
+
|
|
5
|
+
### New features
|
|
6
|
+
|
|
7
|
+
- The secure payload has a new field `verification`.
|
|
8
|
+
- Increased the protection against requests from untrusted devices. The
|
|
9
|
+
malicious and suspicious requests will return a new error code
|
|
10
|
+
`UNTRUSTED_SECURE_SESSION`.
|
|
11
|
+
- The `manualCaptureFallback` time has been increased to 10 seconds.
|
|
12
|
+
- Implemented localisation languages:
|
|
13
|
+
|
|
14
|
+
- `BG-bg`: Bulgarian
|
|
15
|
+
- `fa-IR`: Persian
|
|
16
|
+
- `pt-BR`: Portuguese (Brazil)
|
|
17
|
+
- `pt` and `pt-BR` are both Brazilian. `pt` is now deprecated and it will be
|
|
18
|
+
removed on future releases.
|
|
19
|
+
- `pt-PT`: Portuguese (Portugal)
|
|
20
|
+
|
|
21
|
+
### Fixes
|
|
22
|
+
|
|
23
|
+
- Secure session initialisation request is not longer cached.
|
|
24
|
+
- Added missing fields in the typing file.
|
|
25
|
+
- Camera feedback messages are shown only after the camera permissions were
|
|
26
|
+
giving not before.
|
|
27
|
+
|
|
3
28
|
## v1.2.0
|
|
4
29
|
|
|
5
30
|
### New features
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Yoti Face capture integration
|
|
2
2
|
|
|
3
|
+
> **IMPORTANT**: Testing version. It does not support the `secure` mode.
|
|
4
|
+
|
|
3
5
|
The purpose of this module is to capture a face and return the output image.
|
|
4
6
|
|
|
5
7
|
## CHANGELOG
|
|
@@ -22,14 +24,14 @@ The package depends on the following peer dependencies
|
|
|
22
24
|
|
|
23
25
|
<browserSupportTable>
|
|
24
26
|
|
|
25
|
-
| Browser | Versions
|
|
26
|
-
| ------- |
|
|
27
|
-
| and_chr |
|
|
28
|
-
| chrome |
|
|
29
|
-
| edge |
|
|
30
|
-
| firefox |
|
|
31
|
-
| ios_saf |
|
|
32
|
-
| safari |
|
|
27
|
+
| Browser | Versions |
|
|
28
|
+
| ------- | ------------------- |
|
|
29
|
+
| and_chr | 117 |
|
|
30
|
+
| chrome | 118,117,116,115 |
|
|
31
|
+
| edge | 118,117 |
|
|
32
|
+
| firefox | 118,117,116,115 |
|
|
33
|
+
| ios_saf | 17.0,16.6,16.5 |
|
|
34
|
+
| safari | 17.0,16.6,16.5,16.4 |
|
|
33
35
|
|
|
34
36
|
</browserSupportTable>
|
|
35
37
|
|
|
@@ -41,6 +43,8 @@ _Note: Edge is only supported on desktop versions._
|
|
|
41
43
|
|
|
42
44
|
Finally, some devices might experience poor performance when attempting to detect a face. This is because the underlying library TensorFlow.js can still be too demanding for older less performant devices.
|
|
43
45
|
|
|
46
|
+
_Note: `iPhone 7` and older will take a longer time to load the face detector model than more recent devices, and in most cases, will fall back from auto to manual capture mode. If this behaviour is not desired, as an integrator you could disable the manual capture mode altogether, implementing manualCaptureFallback = false. Note, this could increase the load time for old and low-quality devices._
|
|
47
|
+
|
|
44
48
|
## React face capture module
|
|
45
49
|
|
|
46
50
|
### Install dependency
|
|
@@ -98,6 +102,7 @@ new CopyPlugin([
|
|
|
98
102
|
Current languages supported:
|
|
99
103
|
|
|
100
104
|
- `en`: English
|
|
105
|
+
- `bg-BG`: Bulgarian
|
|
101
106
|
- `ar`: Arabic
|
|
102
107
|
- `cs`: Czech
|
|
103
108
|
- `da`: Danish
|
|
@@ -106,6 +111,7 @@ Current languages supported:
|
|
|
106
111
|
- `es`: Spanish (Spain)
|
|
107
112
|
- `es-419`: Spanish (Latin America)
|
|
108
113
|
- `et`: Estonian
|
|
114
|
+
- `fa-IR` : Persian
|
|
109
115
|
- `fi`: Finnish
|
|
110
116
|
- `fr`: French
|
|
111
117
|
- `he`: Hebrew
|
|
@@ -121,7 +127,9 @@ Current languages supported:
|
|
|
121
127
|
- `nb`: Norwegian
|
|
122
128
|
- `nl`: Dutch
|
|
123
129
|
- `pl`: Polish
|
|
124
|
-
- `pt`: Portuguese
|
|
130
|
+
- `pt`: Portuguese `[deprecated]`
|
|
131
|
+
- `pt-BR`: Portuguese (Brazil)
|
|
132
|
+
- `pt-PT`: Portuguese (Portugal)
|
|
125
133
|
- `ro`: Romanian
|
|
126
134
|
- `ru`: Russian
|
|
127
135
|
- `sv`: Swedish
|
|
@@ -176,7 +184,8 @@ be returned in `onSuccess` callback:
|
|
|
176
184
|
"secure": {
|
|
177
185
|
"version": "<fcm_version>",
|
|
178
186
|
"token": "<session_token>",
|
|
179
|
-
"signature": "<result_signature>"
|
|
187
|
+
"signature": "<result_signature>",
|
|
188
|
+
"verification": "<verification_data>"
|
|
180
189
|
}
|
|
181
190
|
}
|
|
182
191
|
```
|
|
@@ -191,6 +200,10 @@ on demand so the front-end must be able to handle that requests. Keep in mind if
|
|
|
191
200
|
your front-end uses any mechanism to prevent data injection attacks or
|
|
192
201
|
cross-site scripting like SCP you will need to allow the FCM requests.
|
|
193
202
|
|
|
203
|
+
##### Virtual cameras
|
|
204
|
+
|
|
205
|
+
The secure mode detects modifications on the camera stream source and fraudulent camera hardware. In these scenarios, it will return an `UNTRUSTED_SECURE_SESSION` error code when calling the Yoti BE service.
|
|
206
|
+
|
|
194
207
|
### Example
|
|
195
208
|
|
|
196
209
|
```js
|
package/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.mtcvKOHbFdRFpAH7ZHwW{align-items:center;background-color:#2875bc;border:none;border-radius:5px;color:#fff;cursor:pointer;display:block;display:flex;font-size:14px;font-weight:500;justify-content:center;letter-spacing:.5px;margin:auto;min-width:134px;outline:none;padding:12px 20px;text-transform:uppercase;transition:background-color .15s ease-out 0s;width:100%}.mtcvKOHbFdRFpAH7ZHwW.kYH4ilWb5sFtCcwqD29n{max-width:350px;width:45%}.mtcvKOHbFdRFpAH7ZHwW:hover{background-color:#27619b}.mtcvKOHbFdRFpAH7ZHwW:disabled{background-color:#6ba7df}.GusgiqC_1nbmjyHkruu0 use{fill:currentColor}.dDcfK_agfQV9XSYSuuxR{align-items:center;bottom:-8px;box-sizing:border-box;display:inline-block;justify-content:center;padding:16px;position:absolute;text-align:center;width:100%}._XKP_3EMO0LKJr53EW21{height:auto;transform:scaleX(-1);width:100%}._cYL8AOtgycwZXRT1onC{min-height:300px}.bX5GJJw3AqsCwBDA6qWZ{visibility:hidden}.RxkomAqHmrdu47_oGii4{bottom:-8px;box-sizing:border-box;display:grid;font-size:40px;grid-template-columns:repeat(3,80px) 50px;justify-content:center;padding:16px;position:absolute;text-align:center;width:100%}.ZSTtG9h6K6_0_axlDNnV,.__OOQVMtxL3v8uCw9eKy,.hwSkw4zQBundKmrqIwqC{color:#333b40;font-family:sans-serif;font-size:40px;font-weight:700;height:50px;line-height:55px;text-align:center;width:51px}.__OOQVMtxL3v8uCw9eKy{opacity:.5}.Gf_S7QnzULbIZZZ7roY2,.OZI1jG8pdtaOfb2ZsB2n,.XOix2SeWtEFksSSmLt9v{fill:#333b40}.Gf_S7QnzULbIZZZ7roY2 use,.OZI1jG8pdtaOfb2ZsB2n use,.XOix2SeWtEFksSSmLt9v use{fill:inherit}.ZSTtG9h6K6_0_axlDNnV svg,.__OOQVMtxL3v8uCw9eKy svg,.hwSkw4zQBundKmrqIwqC svg{font-size:50px}.Gf_S7QnzULbIZZZ7roY2{opacity:.5}.aM6UBOeSFg8vwirw8BEs{position:absolute}.HPEPfcUpwWOVOJSPP9R_{box-sizing:border-box;color:#546072;height:100%;left:0;position:absolute;right:0}.HPEPfcUpwWOVOJSPP9R_._0fft05LhDRetV8QdNSI{color:#1b9f4a}.HPEPfcUpwWOVOJSPP9R_.JHe4OqVjOOuBZXJn_axE{color:#db970e}.xsnSbKRs6MZbpP2odJGk{box-sizing:border-box;position:absolute;width:100%}.xsnSbKRs6MZbpP2odJGk.lSsJ_kvBTJOO0shULKLn{height:43.5%;top:28.3%}.xsnSbKRs6MZbpP2odJGk._6X0Zl0a0b8R2wCqGS_K{height:71.7%;top:11.5%}@keyframes TgYAVlLOGfJ_hl3TBdkC{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.X_Bq5FImnGbO6TLe3Len{align-items:center;display:flex;height:100%;justify-content:center;line-height:0;text-align:center}.WPX6_jcjLpB6aH420ZCd{animation:TgYAVlLOGfJ_hl3TBdkC 1.5s infinite}.bPwt8l_jKvlB2llQ7azY{height:35.71px;width:35.71px}.bPwt8l_jKvlB2llQ7azY use{fill:#333b40}.Ds2gos19dHtdm4Aer1pq{display:flex;height:100%;justify-content:center;position:absolute;top:0;width:100%}.x_r8eQXclQHy5Jjno7pU{display:block;height:100%;margin:auto;position:absolute}.IpX4dJbHat9i3luoCwef{align-items:start;background-color:#fff;border-radius:.3em;box-shadow:0 8px 15px #333b401a;box-sizing:border-box;color:#333b40;display:flex;font-family:sans-serif;font-size:16px;font-size:var(--message-font-size);font-weight:900;justify-content:start;left:50%;padding:.4em 0;position:absolute;text-align:center}.a_0VmnisbKCGWfubHrmj{margin-bottom:50px;top:4.6%;transform:translate(-50%);width:90%}.CqNtyAmFAcDIeu8mRGPD{top:5.5%;transform:translate(-50%);width:51.25%}.rlF15FcuMGotbEHYe5KW{align-items:start;font-size:calc(var(--message-font-size) + 3px)}._CvVxyqwMB2D7fkKx_NZ{display:flex;justify-content:center;order:1;width:14%}._znJxLRvhRnuCU0KBY3_{order:2;width:72%}._2_U2DYHedfGUyvS1oS5{display:flex;flex-direction:column;overflow:hidden;position:relative}.mteIzegCA0cNMXt96BYN{position:relative}.Va8swWS5S29Uvou7UNnc{height:100%;position:absolute;width:100%}
|
|
1
|
+
.mtcvKOHbFdRFpAH7ZHwW{align-items:center;background-color:#2875bc;border:none;border-radius:5px;color:#fff;cursor:pointer;display:block;display:flex;font-size:14px;font-weight:500;justify-content:center;letter-spacing:.5px;margin:auto;min-width:134px;outline:none;padding:12px 20px;text-transform:uppercase;transition:background-color .15s ease-out 0s;width:100%}.mtcvKOHbFdRFpAH7ZHwW.kYH4ilWb5sFtCcwqD29n{max-width:350px;width:45%}.mtcvKOHbFdRFpAH7ZHwW:hover{background-color:#27619b}.mtcvKOHbFdRFpAH7ZHwW:disabled{background-color:#6ba7df}.GusgiqC_1nbmjyHkruu0 use{fill:currentColor}.dDcfK_agfQV9XSYSuuxR{align-items:center;bottom:-8px;box-sizing:border-box;display:inline-block;justify-content:center;padding:16px;position:absolute;text-align:center;width:100%}._XKP_3EMO0LKJr53EW21{height:auto;transform:scaleX(-1);width:100%}._cYL8AOtgycwZXRT1onC{min-height:300px}.bX5GJJw3AqsCwBDA6qWZ{visibility:hidden}.RxkomAqHmrdu47_oGii4{bottom:-8px;box-sizing:border-box;display:grid;font-size:40px;grid-template-columns:repeat(3,80px) 50px;justify-content:center;padding:16px;position:absolute;text-align:center;width:100%}.ZSTtG9h6K6_0_axlDNnV,.__OOQVMtxL3v8uCw9eKy,.hwSkw4zQBundKmrqIwqC{color:#333b40;font-family:sans-serif;font-size:40px;font-weight:700;height:50px;line-height:55px;text-align:center;width:51px}.__OOQVMtxL3v8uCw9eKy{opacity:.5}.Gf_S7QnzULbIZZZ7roY2,.OZI1jG8pdtaOfb2ZsB2n,.XOix2SeWtEFksSSmLt9v{fill:#333b40}.Gf_S7QnzULbIZZZ7roY2 use,.OZI1jG8pdtaOfb2ZsB2n use,.XOix2SeWtEFksSSmLt9v use{fill:inherit}.ZSTtG9h6K6_0_axlDNnV svg,.__OOQVMtxL3v8uCw9eKy svg,.hwSkw4zQBundKmrqIwqC svg{font-size:50px}.Gf_S7QnzULbIZZZ7roY2{opacity:.5}.aM6UBOeSFg8vwirw8BEs{position:absolute}.HPEPfcUpwWOVOJSPP9R_{box-sizing:border-box;color:#546072;height:100%;left:0;position:absolute;right:0}.HPEPfcUpwWOVOJSPP9R_._0fft05LhDRetV8QdNSI{color:#1b9f4a}.HPEPfcUpwWOVOJSPP9R_.JHe4OqVjOOuBZXJn_axE{color:#db970e}.xsnSbKRs6MZbpP2odJGk{box-sizing:border-box;position:absolute;width:100%}.xsnSbKRs6MZbpP2odJGk.lSsJ_kvBTJOO0shULKLn{height:43.5%;top:28.3%}.xsnSbKRs6MZbpP2odJGk._6X0Zl0a0b8R2wCqGS_K{height:71.7%;top:11.5%}@keyframes TgYAVlLOGfJ_hl3TBdkC{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.X_Bq5FImnGbO6TLe3Len{align-items:center;display:flex;height:100%;justify-content:center;line-height:0;text-align:center}.WPX6_jcjLpB6aH420ZCd{animation:TgYAVlLOGfJ_hl3TBdkC 1.5s infinite}.bPwt8l_jKvlB2llQ7azY{height:35.71px;width:35.71px}.bPwt8l_jKvlB2llQ7azY use{fill:#333b40}.Ds2gos19dHtdm4Aer1pq{display:flex;height:100%;justify-content:center;position:absolute;top:0;width:100%}.x_r8eQXclQHy5Jjno7pU{display:block;height:100%;margin:auto;position:absolute}.IpX4dJbHat9i3luoCwef{align-items:flex-start;background-color:#fff;border-radius:.3em;box-shadow:0 8px 15px #333b401a;box-sizing:border-box;color:#333b40;display:flex;font-family:sans-serif;font-size:16px;font-size:var(--message-font-size);font-weight:900;justify-content:flex-start;left:50%;padding:.4em 0;position:absolute;text-align:center}.a_0VmnisbKCGWfubHrmj{margin-bottom:50px;top:4.6%;transform:translate(-50%);width:90%}.CqNtyAmFAcDIeu8mRGPD{top:5.5%;transform:translate(-50%);width:51.25%}.rlF15FcuMGotbEHYe5KW{align-items:flex-start;font-size:calc(var(--message-font-size) + 3px)}._CvVxyqwMB2D7fkKx_NZ{display:flex;justify-content:center;order:1;width:14%}._znJxLRvhRnuCU0KBY3_{order:2;width:72%}._2_U2DYHedfGUyvS1oS5{display:flex;flex-direction:column;overflow:hidden;position:relative}.mteIzegCA0cNMXt96BYN{position:relative}.Va8swWS5S29Uvou7UNnc{height:100%;position:absolute;width:100%}
|
package/index.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ declare module '@getyoti/react-face-capture' {
|
|
|
13
13
|
FACE_DETECTION_INIT_ERROR = 'FACE_DETECTION_INIT_ERROR',
|
|
14
14
|
CAPTURE_LOAD_ERROR = 'CAPTURE_LOAD_ERROR',
|
|
15
15
|
INTERNAL_ERROR = 'INTERNAL_ERROR',
|
|
16
|
+
VIDEO_STREAM_INTERRUPTED = 'VIDEO_STREAM_INTERRUPTED',
|
|
17
|
+
SECURE_SESSION_EXPIRED = 'SECURE_SESSION_EXPIRED',
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
/**
|
|
@@ -79,13 +81,16 @@ declare module '@getyoti/react-face-capture' {
|
|
|
79
81
|
*/
|
|
80
82
|
export enum LANGUAGE_CODE {
|
|
81
83
|
AR = 'ar',
|
|
84
|
+
BG_BG = 'bg-BG',
|
|
82
85
|
CS = 'cs',
|
|
83
86
|
DA = 'da',
|
|
84
87
|
DE = 'de',
|
|
88
|
+
EL = 'el',
|
|
85
89
|
EN = 'en',
|
|
86
90
|
ES = 'es',
|
|
87
91
|
ES_419 = 'es-419',
|
|
88
92
|
ET = 'et',
|
|
93
|
+
FA_IR = 'fa-IR',
|
|
89
94
|
FI = 'fi',
|
|
90
95
|
FR = 'fr',
|
|
91
96
|
HE = 'he',
|
|
@@ -101,7 +106,12 @@ declare module '@getyoti/react-face-capture' {
|
|
|
101
106
|
NB = 'nb',
|
|
102
107
|
NL = 'nl',
|
|
103
108
|
PL = 'pl',
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated Use {@link LANGUAGE_CODE.PT_BR} or {@link LANGUAGE_CODE.PT_PT} instead.
|
|
111
|
+
*/
|
|
104
112
|
PT = 'pt',
|
|
113
|
+
PT_BR = 'pt-BR',
|
|
114
|
+
PT_PT = 'pt-PT',
|
|
105
115
|
RO = 'ro',
|
|
106
116
|
RU = 'ru',
|
|
107
117
|
SV = 'sv',
|
|
@@ -119,6 +129,7 @@ declare module '@getyoti/react-face-capture' {
|
|
|
119
129
|
version: string;
|
|
120
130
|
token: string;
|
|
121
131
|
signature: string;
|
|
132
|
+
verification: string;
|
|
122
133
|
}
|
|
123
134
|
|
|
124
135
|
/**
|