@symbiote-native/local-auth 2.0.0 → 3.0.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
CHANGED
|
@@ -11,6 +11,24 @@ re-exports of the same `core`.
|
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
14
|
+
**New app:**
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npx @symbiote-native/cli new my-app --local-auth
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Existing SymbioteNative app:**
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx @symbiote-native/cli add --local-auth
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Either way: installs `@symbiote-native/local-auth` and wires the native autolinking automatically — see
|
|
27
|
+
[`@symbiote-native/cli`](../cli).
|
|
28
|
+
|
|
29
|
+
<details>
|
|
30
|
+
<summary>Manual install (no CLI — installing and wiring native autolinking by hand)</summary>
|
|
31
|
+
|
|
14
32
|
```bash
|
|
15
33
|
npm install @symbiote-native/local-auth
|
|
16
34
|
```
|
|
@@ -44,6 +62,8 @@ just add the strings your app's own Info.plist/manifest needs:
|
|
|
44
62
|
device passcode instead of prompting FaceID).
|
|
45
63
|
- Android — `USE_BIOMETRIC` in `AndroidManifest.xml`.
|
|
46
64
|
|
|
65
|
+
</details>
|
|
66
|
+
|
|
47
67
|
## Shape
|
|
48
68
|
|
|
49
69
|
```
|
|
@@ -330,13 +350,13 @@ export class LocalAuthScreen {
|
|
|
330
350
|
```
|
|
331
351
|
|
|
332
352
|
There's no per-instance service to `inject()` in the Angular case — every function is a plain
|
|
333
|
-
free function off the core package, called straight from the constructor. The
|
|
334
|
-
|
|
353
|
+
free function off the core package, called straight from the constructor. The examples above are
|
|
354
|
+
trimmed from the real canary demo screens, which exist for all six Expo canaries
|
|
335
355
|
(`examples/expo-react/screens/LocalAuthScreen.tsx`,
|
|
336
356
|
`examples/expo-vue-sfc/screens/LocalAuthScreen.vue`, `examples/expo-vue-tsx/screens/LocalAuthScreen.tsx`,
|
|
357
|
+
`examples/expo-svelte/screens/LocalAuthScreen.svelte`, `examples/expo-solid/screens/LocalAuthScreen.tsx`,
|
|
337
358
|
`examples/expo-angular/src/screens/LocalAuthScreen.ts`), which also cover
|
|
338
|
-
`getEnrolledLevelAsync`/`supportedAuthenticationTypesAsync` and render a capabilities card.
|
|
339
|
-
canary demo screen exists yet for Svelte/Solid — the two snippets above follow the same surface.
|
|
359
|
+
`getEnrolledLevelAsync`/`supportedAuthenticationTypesAsync` and render a capabilities card.
|
|
340
360
|
|
|
341
361
|
## API
|
|
342
362
|
|
|
@@ -54,7 +54,7 @@ export async function authenticateAsync(options = {}) {
|
|
|
54
54
|
if (!expoLocalAuthentication.authenticateAsync) {
|
|
55
55
|
throw new UnavailabilityError(NATIVE_MODULE_NAME, 'authenticateAsync');
|
|
56
56
|
}
|
|
57
|
-
if (options
|
|
57
|
+
if (Object.hasOwn(options, 'promptMessage')) {
|
|
58
58
|
invariant(typeof options.promptMessage === 'string' &&
|
|
59
59
|
options.promptMessage.length > 0, 'LocalAuthentication.authenticateAsync: `options.promptMessage` must be a non-empty string.');
|
|
60
60
|
}
|
|
@@ -54,7 +54,7 @@ export async function authenticateAsync(options = {}) {
|
|
|
54
54
|
if (!expoLocalAuthentication.authenticateAsync) {
|
|
55
55
|
throw new UnavailabilityError(NATIVE_MODULE_NAME, 'authenticateAsync');
|
|
56
56
|
}
|
|
57
|
-
if (options
|
|
57
|
+
if (Object.hasOwn(options, 'promptMessage')) {
|
|
58
58
|
invariant(typeof options.promptMessage === 'string' &&
|
|
59
59
|
options.promptMessage.length > 0, 'LocalAuthentication.authenticateAsync: `options.promptMessage` must be a non-empty string.');
|
|
60
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-authentication.js","sourceRoot":"","sources":["../../src/core/local-authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,E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
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "expo-local-authentication wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. FaceID/TouchID on iOS, the Fingerprint/Biometric API on Android.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -81,12 +81,12 @@
|
|
|
81
81
|
"solid-js": ">=1.9.0",
|
|
82
82
|
"svelte": ">=5.56.0",
|
|
83
83
|
"vue": ">=3.5.0",
|
|
84
|
-
"@symbiote-native/angular": "^
|
|
85
|
-
"@symbiote-native/engine": "^
|
|
86
|
-
"@symbiote-native/react": "^
|
|
87
|
-
"@symbiote-native/solid": "^
|
|
88
|
-
"@symbiote-native/svelte": "^
|
|
89
|
-
"@symbiote-native/vue": "^
|
|
84
|
+
"@symbiote-native/angular": "^3.1.1",
|
|
85
|
+
"@symbiote-native/engine": "^1.3.0",
|
|
86
|
+
"@symbiote-native/react": "^3.0.3",
|
|
87
|
+
"@symbiote-native/solid": "^3.0.3",
|
|
88
|
+
"@symbiote-native/svelte": "^3.0.3",
|
|
89
|
+
"@symbiote-native/vue": "^3.0.3"
|
|
90
90
|
},
|
|
91
91
|
"peerDependenciesMeta": {
|
|
92
92
|
"@symbiote-native/angular": {
|
|
@@ -135,13 +135,13 @@
|
|
|
135
135
|
"solid-js": "^1.9.14",
|
|
136
136
|
"svelte": "^5.56.0",
|
|
137
137
|
"typescript": "~6.0.0",
|
|
138
|
-
"@symbiote-native/angular": "
|
|
139
|
-
"@symbiote-native/engine": "
|
|
140
|
-
"@symbiote-native/react": "
|
|
141
|
-
"@symbiote-native/solid": "
|
|
142
|
-
"@symbiote-native/svelte": "
|
|
143
|
-
"@symbiote-native/test-utils": "0.3
|
|
144
|
-
"@symbiote-native/vue": "
|
|
138
|
+
"@symbiote-native/angular": "3.1.1",
|
|
139
|
+
"@symbiote-native/engine": "1.3.0",
|
|
140
|
+
"@symbiote-native/react": "3.0.3",
|
|
141
|
+
"@symbiote-native/solid": "3.0.3",
|
|
142
|
+
"@symbiote-native/svelte": "3.0.3",
|
|
143
|
+
"@symbiote-native/test-utils": "0.4.3",
|
|
144
|
+
"@symbiote-native/vue": "3.0.3"
|
|
145
145
|
},
|
|
146
146
|
"scripts": {
|
|
147
147
|
"typecheck": "tsc --build",
|
|
@@ -75,7 +75,7 @@ export async function authenticateAsync(
|
|
|
75
75
|
throw new UnavailabilityError(NATIVE_MODULE_NAME, 'authenticateAsync');
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
if (options
|
|
78
|
+
if (Object.hasOwn(options, 'promptMessage')) {
|
|
79
79
|
invariant(
|
|
80
80
|
typeof options.promptMessage === 'string' &&
|
|
81
81
|
options.promptMessage.length > 0,
|