@authme/identity-verification 2.8.57 → 2.8.59

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
@@ -2,6 +2,40 @@
2
2
 
3
3
  This library was generated with [Nx](https://nx.dev).
4
4
 
5
+ ## Public API highlights
6
+
7
+ ### `isSupported()` — pre-flight environment check
8
+
9
+ Synchronous binary check that the current browser/device falls within the
10
+ SDK's supported range. Call it before initializing `AuthmeIdentityVerification`
11
+ so unsupported users hit a friendly "this device is not supported" page
12
+ instead of an opaque error mid-flow.
13
+
14
+ ```ts
15
+ import { isSupported } from '@authme/identity-verification';
16
+
17
+ const check = isSupported();
18
+ if (!check.supported) {
19
+ // Show "please use another browser/device". Log `reasons` to telemetry.
20
+ console.warn('eKYC unsupported:', check.reasons, check.info);
21
+ return;
22
+ }
23
+ // supported === true → continue with SDK initialization
24
+ ```
25
+
26
+ The returned object:
27
+
28
+ | Field | Meaning |
29
+ | ----------- | ------------------------------------------------------------------------- |
30
+ | `supported` | `true` iff `reasons` is empty. |
31
+ | `reasons` | Why the device is unsupported. One or more of: `NO_WEBASSEMBLY`, `NO_MEDIA_DEVICES`, `INSECURE_CONTEXT`, `OLD_IOS` (iOS < 16.4), `OLD_ANDROID` (Android < 9), `IN_APP_WEBVIEW` (LINE / FB / IG / Messenger / WeChat). Empty when `supported` is `true`. |
32
+ | `info` | Detected environment snapshot — device string, system string, WASM flags, mediaDevices, secureContext, in-app WebView, hardwareConcurrency, deviceMemory. Useful for telemetry regardless of `supported`. |
33
+
34
+ The check is purely UA + feature detection: it does **not** request the
35
+ camera, load the engine, or make network requests. Typical execution time
36
+ is sub-millisecond. See `docs/browser-support-matrix.md` for the
37
+ corresponding human-readable support matrix.
38
+
5
39
  ## Running unit tests
6
40
 
7
41
  Run `nx test identity-verification-feature-identity-verification` to execute the unit tests via [Jest](https://jestjs.io).
@@ -230,7 +230,7 @@
230
230
  "sdk.home.selectDocument.hint.upcoming": "即將進行",
231
231
  "sdk.home.selectDocument.title": "國家與證件",
232
232
  "sdk.home.title": "證件辨識",
233
- "sdk.liveness.detection.content": "將臉部置於方框中,依照畫面指示進行操作",
233
+ "sdk.liveness.detection.content": "將臉部置於圓框中,依照畫面指示進行操作",
234
234
  "sdk.liveness.detection.header": "人臉辨識",
235
235
  "sdk.liveness.detection.infopageHint.environment": "在環境光線充足的地方進行",
236
236
  "sdk.liveness.detection.infopageHint.face": "請確保臉上沒有任何遮蔽物",