@octane-xplat/biometrics 0.9.0 → 0.10.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 +14 -6
- package/package.json +1 -1
- package/src/types.ts +1 -1
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# `@octane-xplat/biometrics`
|
|
2
2
|
|
|
3
|
+
```sh
|
|
4
|
+
pnpm add @octane-xplat/biometrics
|
|
5
|
+
```
|
|
6
|
+
|
|
3
7
|
Local biometric verification — Face ID / Touch ID / fingerprint or device
|
|
4
8
|
credential — behind one capability object. iOS and Android run
|
|
5
9
|
`@nativescript/biometrics`; web and the macOS AppKit host report
|
|
6
10
|
`supported: false` (WebAuthn is an authentication ceremony, not a
|
|
7
11
|
local-presence check, and the dev host has no LocalAuthentication bridge).
|
|
8
12
|
|
|
9
|
-
```sh
|
|
10
|
-
pnpm add @octane-xplat/biometrics
|
|
11
|
-
```
|
|
12
|
-
|
|
13
13
|
```ts
|
|
14
14
|
import { biometrics } from '@octane-xplat/biometrics'
|
|
15
15
|
|
|
@@ -24,7 +24,15 @@ implementation exists on this target — branch on it rather than catching —
|
|
|
24
24
|
the service once usable. `verify(reason)` resolves `false` for a declined
|
|
25
25
|
or failed prompt rather than throwing.
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
```ts
|
|
28
|
+
import { biometrics } from '@octane-xplat/biometrics'
|
|
29
|
+
|
|
30
|
+
if ((await biometrics.ensure()) === 'granted') {
|
|
31
|
+
const ok = await biometrics.impl!.verify('Unlock your saved trips')
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Guide: [Using device features](../../docs/platform/platform-services.md);
|
|
36
|
+
per-target availability: [platform notes](../../docs/notes/platform-notes.md).
|
|
29
37
|
Exercised by the harness `Services` screen
|
|
30
38
|
([`packages/app/src/Services.tsrx`](../app/src/Services.tsrx)).
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Optional capability — never throws for absence (docs/platform-services.md). */
|
|
1
|
+
/** Optional capability — never throws for absence (docs/platform/platform-services.md). */
|
|
2
2
|
export interface Capability<T> {
|
|
3
3
|
supported: boolean
|
|
4
4
|
ensure(): Promise<'granted' | 'denied' | 'unsupported'>
|