idmission-web-sdk 2.1.10 → 2.1.12
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 +64 -64
- package/README.mdx +31 -998
- package/dist/components/customer_flows/CustomerIdentification.d.ts +5 -1
- package/dist/components/customer_flows/CustomerVerification.d.ts +5 -1
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts +8 -8
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts +8 -8
- package/dist/components/id_capture/IdCaptureSuccess.d.ts +3 -2
- package/dist/components/signature_capture/SignatureCapture.d.ts +1 -0
- package/dist/components/submission/SubmissionProvider.d.ts +5 -2
- package/dist/contexts/AuthStateContext.d.ts +2 -1
- package/dist/index.d.ts +3 -2
- package/dist/sdk2.cjs.development.js +27 -12
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +20 -4
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +27 -12
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@ Storybook: https://websdk2test.idmission.com
|
|
|
8
8
|
|
|
9
9
|
## Getting Started
|
|
10
10
|
|
|
11
|
+
### Authentication
|
|
12
|
+
|
|
11
13
|
Before using the IDmission WebSDK, you will need to obtain an API key. New customers receive their API credentials via email. If you haven't received them, reach out to support@idmission.com.
|
|
12
14
|
|
|
13
15
|
To test that your credentials are valid:
|
|
@@ -23,7 +25,7 @@ Prior to initializing the WebSDK on the client, you should generate a session on
|
|
|
23
25
|
|
|
24
26
|
If you are using NodeJS, check out our [auth client for server-side JavaScript](https://www.npmjs.com/package/idmission-auth-client).
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
### Basic Usage in Typescript/React
|
|
27
29
|
|
|
28
30
|
```bash
|
|
29
31
|
npm i idmission-web-sdk
|
|
@@ -39,7 +41,7 @@ render(<IdValidation sessionId={YOUR_SESSION_ID} />, document.getElementById('ro
|
|
|
39
41
|
|
|
40
42
|
```
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
### Basic Usage in HTML
|
|
43
45
|
|
|
44
46
|
Add the following script tag to your page's `<head>`:
|
|
45
47
|
|
|
@@ -74,7 +76,22 @@ Then you may call any render method below, for example `renderIdValidation`, lik
|
|
|
74
76
|
|
|
75
77
|
Render a fullscreen ID capture component that instructs the user to photograph both sides of their ID card, or full page of their passport.
|
|
76
78
|
|
|
77
|
-
|
|
79
|
+
#### Example
|
|
80
|
+
|
|
81
|
+
```js
|
|
82
|
+
IDmissionSDK.renderIdValidation('#target-element', {
|
|
83
|
+
sessionId: 'my-idmission-session-id',
|
|
84
|
+
onApproved: (submissionResponse) => {
|
|
85
|
+
alert('Your ID has been validated, proceed to the next checkpoint.')
|
|
86
|
+
},
|
|
87
|
+
onDenied: (submissionResponse) => {
|
|
88
|
+
alert('Your ID could not be validated, you shall not pass!')
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
#### Props
|
|
78
95
|
|
|
79
96
|
| sessionId | a session id generated with your IDmission credentials, or an async function that resolves to one. |
|
|
80
97
|
| ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -134,7 +151,7 @@ Render a fullscreen ID capture component that instructs the user to photograph b
|
|
|
134
151
|
| geolocationRequired (optional) | boolean flag to indicate whether users should be blocked from proceeding if they block location access. Defaults to false. |
|
|
135
152
|
| debugMode (optional) | boolean flag to enable on-screen prediction information output. Defaults to false. |
|
|
136
153
|
|
|
137
|
-
|
|
154
|
+
#### ID Capture Assets
|
|
138
155
|
|
|
139
156
|
| documentDetectionModelUrl | Default: https://websdk-cdn-dev.idmission.com/assets/models/documentdetection448/model.json |
|
|
140
157
|
| ------------------------------------------ | -------------------------------------------------------------------------------------------------- |
|
|
@@ -152,7 +169,7 @@ Render a fullscreen ID capture component that instructs the user to photograph b
|
|
|
152
169
|
| flipIdPrompt.backPortraitGuidesImageUrl | Default: value of idCardBack.portraitGuidesImageUrl |
|
|
153
170
|
| flipIdPrompt.backLandscapeGuidesImageUrl | Default: value of idCardBack.landscapeGuidesImageUrl |
|
|
154
171
|
|
|
155
|
-
|
|
172
|
+
#### ID Capture Colors
|
|
156
173
|
|
|
157
174
|
| loadingOverlay.continueBtn.backgroundColor | Default: #16a085 |
|
|
158
175
|
| ---------------------------------------------------------- | ---------------- |
|
|
@@ -170,7 +187,7 @@ Render a fullscreen ID capture component that instructs the user to photograph b
|
|
|
170
187
|
| success.retryBtn.backgroundColor | Default: #ea8557 |
|
|
171
188
|
| success.retryBtn.textColor | Default: white |
|
|
172
189
|
|
|
173
|
-
|
|
190
|
+
#### ID Capture Verbiage
|
|
174
191
|
|
|
175
192
|
| loadingOverlay.headingText | Default: "Use your device camera to capture your ID" |
|
|
176
193
|
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -212,25 +229,25 @@ Render a fullscreen ID capture component that instructs the user to photograph b
|
|
|
212
229
|
| success.submittingText | Default: "Submitting..." |
|
|
213
230
|
| success.submitText | Default: "Submit" |
|
|
214
231
|
|
|
232
|
+
### FaceValidation
|
|
233
|
+
|
|
234
|
+
Render a fullscreen capture component that analyzes frames from the user's front-facing camera to determine whether a live human face is present.
|
|
235
|
+
|
|
215
236
|
**Example**
|
|
216
237
|
|
|
217
238
|
```js
|
|
218
|
-
IDmissionSDK.
|
|
239
|
+
IDmissionSDK.renderFaceValidation('#target-element', {
|
|
219
240
|
sessionId: 'my-idmission-session-id',
|
|
220
241
|
onApproved: (submissionResponse) => {
|
|
221
|
-
alert('Your
|
|
242
|
+
alert('Your face is real, proceed to the next checkpoint.')
|
|
222
243
|
},
|
|
223
244
|
onDenied: (submissionResponse) => {
|
|
224
|
-
alert('Your
|
|
245
|
+
alert('Your face realness could not be validated, you shall not pass!')
|
|
225
246
|
},
|
|
226
247
|
});
|
|
227
248
|
|
|
228
249
|
```
|
|
229
250
|
|
|
230
|
-
### FaceValidation
|
|
231
|
-
|
|
232
|
-
Render a fullscreen capture component that analyzes frames from the user's front-facing camera to determine whether a live human face is present.
|
|
233
|
-
|
|
234
251
|
**Props**
|
|
235
252
|
|
|
236
253
|
| sessionId | a session id generated with your IDmission credentials, or an async function that resolves to one. |
|
|
@@ -329,25 +346,25 @@ Render a fullscreen capture component that analyzes frames from the user's front
|
|
|
329
346
|
| failure.retryBtnText | Default: "Retry" |
|
|
330
347
|
| failure.exitBtnText | Default: "Exit" |
|
|
331
348
|
|
|
349
|
+
### IdAndFaceValidation
|
|
350
|
+
|
|
351
|
+
Render a fullscreen capture component that performs IDValidation and FaceValidation sequentially.
|
|
352
|
+
|
|
332
353
|
**Example**
|
|
333
354
|
|
|
334
355
|
```js
|
|
335
|
-
IDmissionSDK.
|
|
356
|
+
IDmissionSDK.renderIdAndFaceValidation('#target-element', {
|
|
336
357
|
sessionId: 'my-idmission-session-id',
|
|
337
358
|
onApproved: (submissionResponse) => {
|
|
338
|
-
alert('Your face is real, proceed to the next checkpoint.')
|
|
359
|
+
alert('Your ID has been validated and your face is real, proceed to the next checkpoint.')
|
|
339
360
|
},
|
|
340
361
|
onDenied: (submissionResponse) => {
|
|
341
|
-
alert('Your face realness could not be validated, you shall not pass!')
|
|
362
|
+
alert('Your ID or face realness could not be validated, you shall not pass!')
|
|
342
363
|
},
|
|
343
364
|
});
|
|
344
365
|
|
|
345
366
|
```
|
|
346
367
|
|
|
347
|
-
### IdAndFaceValidation
|
|
348
|
-
|
|
349
|
-
Render a fullscreen capture component that performs IDValidation and FaceValidation sequentially.
|
|
350
|
-
|
|
351
368
|
**Props**
|
|
352
369
|
|
|
353
370
|
| sessionId | a session id generated with your IDmission credentials, or an async function that resolves to one. |
|
|
@@ -417,25 +434,20 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
|
|
|
417
434
|
| geolocationRequired (optional) | boolean flag to indicate whether users should be blocked from proceeding if they block location access. Defaults to false. |
|
|
418
435
|
| debugMode (optional) | boolean flag to enable on-screen prediction information output. Defaults to false. |
|
|
419
436
|
|
|
437
|
+
### CustomerIdAndBiometricsEnrollment
|
|
438
|
+
|
|
439
|
+
Render a fullscreen capture component that performs IDValidation and FaceValidation sequentially, and then stores the results in IDmission's customer database using the supplied `enrollmentId` for later verification or 1:N matching.
|
|
440
|
+
|
|
420
441
|
**Example**
|
|
421
442
|
|
|
422
443
|
```js
|
|
423
|
-
IDmissionSDK.
|
|
444
|
+
IDmissionSDK.renderCustomerIdAndBiometricsEnrollment('#target-element', {
|
|
424
445
|
sessionId: 'my-idmission-session-id',
|
|
425
|
-
|
|
426
|
-
alert('Your ID has been validated and your face is real, proceed to the next checkpoint.')
|
|
427
|
-
},
|
|
428
|
-
onDenied: (submissionResponse) => {
|
|
429
|
-
alert('Your ID or face realness could not be validated, you shall not pass!')
|
|
430
|
-
},
|
|
446
|
+
enrollmentId: 'some-guy',
|
|
431
447
|
});
|
|
432
448
|
|
|
433
449
|
```
|
|
434
450
|
|
|
435
|
-
### CustomerIdAndBiometricsEnrollment
|
|
436
|
-
|
|
437
|
-
Render a fullscreen capture component that performs IDValidation and FaceValidation sequentially, and then stores the results in IDmission's customer database using the supplied `enrollmentId` for later verification or 1:N matching.
|
|
438
|
-
|
|
439
451
|
**Props**
|
|
440
452
|
|
|
441
453
|
| sessionId | a session id generated with your IDmission credentials, or an async function that resolves to one. |
|
|
@@ -508,20 +520,20 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
|
|
|
508
520
|
| geolocationRequired (optional) | boolean flag to indicate whether users should be blocked from proceeding if they block location access. Defaults to false. |
|
|
509
521
|
| debugMode (optional) | boolean flag to enable on-screen prediction information output. Defaults to false. |
|
|
510
522
|
|
|
523
|
+
### CustomerBiometricsEnrollment
|
|
524
|
+
|
|
525
|
+
Render a fullscreen capture component that performs FaceValidation, and then stores the results in IDmission's customer database using the supplied `enrollmentId` for later verification or 1:N matching.
|
|
526
|
+
|
|
511
527
|
**Example**
|
|
512
528
|
|
|
513
529
|
```js
|
|
514
|
-
IDmissionSDK.
|
|
530
|
+
IDmissionSDK.renderCustomerBiometricsEnrollment('#target-element', {
|
|
515
531
|
sessionId: 'my-idmission-session-id',
|
|
516
532
|
enrollmentId: 'some-guy',
|
|
517
533
|
});
|
|
518
534
|
|
|
519
535
|
```
|
|
520
536
|
|
|
521
|
-
### CustomerBiometricsEnrollment
|
|
522
|
-
|
|
523
|
-
Render a fullscreen capture component that performs FaceValidation, and then stores the results in IDmission's customer database using the supplied `enrollmentId` for later verification or 1:N matching.
|
|
524
|
-
|
|
525
537
|
**Props**
|
|
526
538
|
|
|
527
539
|
| sessionId | a session id generated with your IDmission credentials, or an async function that resolves to one. |
|
|
@@ -571,20 +583,20 @@ Render a fullscreen capture component that performs FaceValidation, and then sto
|
|
|
571
583
|
| geolocationRequired (optional) | boolean flag to indicate whether users should be blocked from proceeding if they block location access. Defaults to false. |
|
|
572
584
|
| debugMode (optional) | boolean flag to enable on-screen prediction information output. Defaults to false. |
|
|
573
585
|
|
|
586
|
+
### CustomerVerification
|
|
587
|
+
|
|
588
|
+
Render a fullscreen capture component that analyzes frames from the user's front-facing camera to determine whether the user matches a specified `enrollmentId` that they have previously registered in IDmission's customer database.
|
|
589
|
+
|
|
574
590
|
**Example**
|
|
575
591
|
|
|
576
592
|
```js
|
|
577
|
-
IDmissionSDK.
|
|
593
|
+
IDmissionSDK.renderCustomerVerification('#target-element', {
|
|
578
594
|
sessionId: 'my-idmission-session-id',
|
|
579
595
|
enrollmentId: 'some-guy',
|
|
580
596
|
});
|
|
581
597
|
|
|
582
598
|
```
|
|
583
599
|
|
|
584
|
-
### CustomerVerification
|
|
585
|
-
|
|
586
|
-
Render a fullscreen capture component that analyzes frames from the user's front-facing camera to determine whether the user matches a specified `enrollmentId` that they have previously registered in IDmission's customer database.
|
|
587
|
-
|
|
588
600
|
**Props**
|
|
589
601
|
|
|
590
602
|
| sessionId | a session id generated with your IDmission credentials, or an async function that resolves to one. |
|
|
@@ -625,20 +637,17 @@ Render a fullscreen capture component that analyzes frames from the user's front
|
|
|
625
637
|
| geolocationRequired (optional) | boolean flag to indicate whether users should be blocked from proceeding if they block location access. Defaults to false. |
|
|
626
638
|
| debugMode (optional) | boolean flag to enable on-screen prediction information output. Defaults to false. |
|
|
627
639
|
|
|
640
|
+
### CustomerIdentification
|
|
641
|
+
|
|
642
|
+
Render a fullscreen capture component that analyzes frames from the user's front-facing camera to determine whether the user matches any previously registered customer in IDmission's customer database.
|
|
643
|
+
|
|
628
644
|
**Example**
|
|
629
645
|
|
|
630
646
|
```js
|
|
631
|
-
IDmissionSDK.
|
|
632
|
-
sessionId: 'my-idmission-session-id',
|
|
633
|
-
enrollmentId: 'some-guy',
|
|
634
|
-
});
|
|
647
|
+
IDmissionSDK.renderCustomerIdentification('#target-element', { sessionId: 'my-idmission-session-id' });
|
|
635
648
|
|
|
636
649
|
```
|
|
637
650
|
|
|
638
|
-
### CustomerIdentification
|
|
639
|
-
|
|
640
|
-
Render a fullscreen capture component that analyzes frames from the user's front-facing camera to determine whether the user matches any previously registered customer in IDmission's customer database.
|
|
641
|
-
|
|
642
651
|
**Props**
|
|
643
652
|
|
|
644
653
|
| sessionId | a session id generated with your IDmission credentials, or an async function that resolves to one. |
|
|
@@ -734,17 +743,17 @@ Render a fullscreen capture component that analyzes frames from the user's front
|
|
|
734
743
|
| failure.retryBtnText | Default: "Retry" |
|
|
735
744
|
| failure.exitBtnText | Default: "Exit" |
|
|
736
745
|
|
|
746
|
+
### VideoIdValidation
|
|
747
|
+
|
|
748
|
+
Render a fullscreen capture component that performs IDValidation and FaceValidation sequentially, then captures a video of the user holding their ID, and optionally speaking a prompt aloud.
|
|
749
|
+
|
|
737
750
|
**Example**
|
|
738
751
|
|
|
739
752
|
```js
|
|
740
|
-
IDmissionSDK.
|
|
753
|
+
IDmissionSDK.renderVideoIdValidation('#target-element', { sessionId: 'my-idmission-session-id' });
|
|
741
754
|
|
|
742
755
|
```
|
|
743
756
|
|
|
744
|
-
### VideoIdValidation
|
|
745
|
-
|
|
746
|
-
Render a fullscreen capture component that performs IDValidation and FaceValidation sequentially, then captures a video of the user holding their ID, and optionally speaking a prompt aloud.
|
|
747
|
-
|
|
748
757
|
**Props**
|
|
749
758
|
|
|
750
759
|
| sessionId | a session id generated with your IDmission credentials, or an async function that resolves to one. |
|
|
@@ -847,13 +856,6 @@ Render a fullscreen capture component that performs IDValidation and FaceValidat
|
|
|
847
856
|
| success.retryBtnText | Default: "Retry" |
|
|
848
857
|
| success.doneBtnText | Default: "Done" |
|
|
849
858
|
|
|
850
|
-
**Example**
|
|
851
|
-
|
|
852
|
-
```js
|
|
853
|
-
IDmissionSDK.renderVideoIdValidation('#target-element', { sessionId: 'my-idmission-session-id' });
|
|
854
|
-
|
|
855
|
-
```
|
|
856
|
-
|
|
857
859
|
## Other Functionality
|
|
858
860
|
|
|
859
861
|
### Detecting the current version of the IDmission Web SDK
|
|
@@ -962,6 +964,4 @@ Many customer flow documented above include a `captureAdditionalDocuments` prope
|
|
|
962
964
|
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
963
965
|
| description (optional) | string describing to the user anything extra about the document that they should know |
|
|
964
966
|
| skip (optional) | async function that may return a boolean indicating whether this document should be skipped |
|
|
965
|
-
| processAsPOA (optional) | boolean indicating whether the document should be treated as a proof of address -- when true, the document will be processed and validated on the server. |
|
|
966
|
-
|
|
967
|
-
# HELLO
|
|
967
|
+
| processAsPOA (optional) | boolean indicating whether the document should be treated as a proof of address -- when true, the document will be processed and validated on the server. |
|