youverify-liveness-web 1.0.10 → 1.1.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/README.md +8 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1738 -1652
- package/dist/index.umd.cjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,6 +65,7 @@ try {
|
|
|
65
65
|
| --- | --- | --- | --- | --- | --- |
|
|
66
66
|
| `presentation` | String | No | Controls how UI is displayed | `modal` | `modal`, `page` |
|
|
67
67
|
| `publicKey` | String | No | Your Youverify Public Merchant Key | undefined | Valid Youverify Public Key |
|
|
68
|
+
| `entityId` | String | No | Optional entity identifier to include when the liveness result is submitted | undefined | Any valid entity ID |
|
|
68
69
|
| `sandboxEnvironment` | Boolean | No | Sets whether session should run in sandbox or live mode | `true` | `true`, `false` |
|
|
69
70
|
| `tasks` | Array | No | Sets tasks that need to be performed for liveness to be confirmed | undefined | See [tasks](#tasks) |
|
|
70
71
|
| `user` | Object | No | Sets details of user for which liveness check is being performed | undefined | See nested options below |
|
|
@@ -241,6 +242,7 @@ const initializeLivenessSDK = async () => {
|
|
|
241
242
|
const yvLiveness = new YouverifyLiveness({
|
|
242
243
|
sessionId: sessionId,
|
|
243
244
|
sessionToken: sessionToken,
|
|
245
|
+
entityId: 'your_optional_entity_id',
|
|
244
246
|
sandboxEnvironment: true,
|
|
245
247
|
onSuccess: (data) => {
|
|
246
248
|
console.log('Liveness check passed:', data);
|
|
@@ -275,6 +277,11 @@ const initializeLivenessSDK = async () => {
|
|
|
275
277
|
initializeLivenessSDK();
|
|
276
278
|
```
|
|
277
279
|
|
|
280
|
+
When the SDK submits the liveness payload to `/identity/liveness/`, it now includes:
|
|
281
|
+
|
|
282
|
+
- `sdkVersion`: the SDK package version
|
|
283
|
+
- `entityId`: only when you pass it during SDK initialization
|
|
284
|
+
|
|
278
285
|
### Important Notes
|
|
279
286
|
|
|
280
287
|
1. **API Token Security:** Never expose your API token in frontend code. All API calls to generate `sessionId` and `sessionToken` should be made from your secure backend.
|
|
@@ -358,4 +365,4 @@ The `onSuccess` and `onFailure` callbacks (if supplied) are passed the following
|
|
|
358
365
|
|
|
359
366
|
## Credits
|
|
360
367
|
|
|
361
|
-
This SDK is developed and maintained solely by [Youverify](https://youverify.co)
|
|
368
|
+
This SDK is developed and maintained solely by [Youverify](https://youverify.co)
|