@symbiote-native/local-auth 0.2.0 → 0.4.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 CHANGED
@@ -26,12 +26,12 @@ Unlike a plain RN native module, `expo-local-authentication`'s native code is di
26
26
  into the native host app **once**, covering this package and every other
27
27
  `expo-modules-core` package with zero further changes:
28
28
 
29
- | Platform | Touches |
30
- |---|---|
31
- | iOS | `ios/Podfile` — add `use_expo_modules!` |
32
- | iOS | `AppDelegate.swift` — Expo's runtime-bootstrap hook |
33
- | Android | `settings.gradle` / `app/build.gradle` — resolve and include the Expo Gradle projects |
34
- | Android | `MainApplication.kt` — Expo's bootstrap hook, plus a hand-written native-module name map (there's no `expo` meta-package here to auto-generate one) |
29
+ | Platform | Touches |
30
+ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
31
+ | iOS | `ios/Podfile` — add `use_expo_modules!` |
32
+ | iOS | `AppDelegate.swift` — Expo's runtime-bootstrap hook |
33
+ | Android | `settings.gradle` / `app/build.gradle` — resolve and include the Expo Gradle projects |
34
+ | Android | `MainApplication.kt` — Expo's bootstrap hook, plus a hand-written native-module name map (there's no `expo` meta-package here to auto-generate one) |
35
35
 
36
36
  Full mechanics live in the `symbiote-expo-native-module` project skill. Reference
37
37
  implementation: `examples/expo-react/ios/Podfile` and
@@ -52,13 +52,12 @@ src/core/ hasHardwareAsync / isEnrolledAsync / getEnrolledLevelAsync /
52
52
  AuthenticationType, SecurityLevel, and the option/result/error types.
53
53
  native-module.ts resolves the native module via expo-modules-core's
54
54
  requireNativeModule.
55
- src/react/ @symbiote-native/local-auth/react — export * from '../core'
56
- src/vue/ @symbiote-native/local-auth/vue — export * from '../core'
57
55
  src/angular/ @symbiote-native/local-auth/angular — export * from '../core'
58
56
  ```
59
57
 
60
- No per-adapter lifecycle wrapper exists because there's nothing to subscribe to or clean up —
61
- each adapter entry is a single-file re-export.
58
+ `./react`, `./vue`, and `./svelte` are `exports`-map aliases straight onto `src/core/` — no
59
+ physical per-framework file, since there's nothing to subscribe to or clean up. `./angular` stays
60
+ a physical file/subpath since Angular ships through a separate `ngc`/AOT build (`build-ngc/`).
62
61
 
63
62
  ## Use it
64
63
 
@@ -77,7 +76,8 @@ import type { ILocalAuthenticationResult } from '@symbiote-native/local-auth/rea
77
76
  function LocalAuthScreen() {
78
77
  const [hasHardware, setHasHardware] = useState(false);
79
78
  const [isEnrolled, setIsEnrolled] = useState(false);
80
- const [authResult, setAuthResult] = useState<ILocalAuthenticationResult | null>(null);
79
+ const [authResult, setAuthResult] =
80
+ useState<ILocalAuthenticationResult | null>(null);
81
81
 
82
82
  useEffect(() => {
83
83
  hasHardwareAsync().then(setHasHardware);
@@ -85,12 +85,18 @@ function LocalAuthScreen() {
85
85
  }, []);
86
86
 
87
87
  const handleAuthenticate = () => {
88
- authenticateAsync({ promptMessage: 'Confirm it is you' }).then(setAuthResult);
88
+ authenticateAsync({ promptMessage: 'Confirm it is you' }).then(
89
+ setAuthResult,
90
+ );
89
91
  };
90
92
 
91
93
  return (
92
94
  <View>
93
- <Text>{hasHardware && isEnrolled ? 'Ready to authenticate' : 'No biometrics enrolled'}</Text>
95
+ <Text>
96
+ {hasHardware && isEnrolled
97
+ ? 'Ready to authenticate'
98
+ : 'No biometrics enrolled'}
99
+ </Text>
94
100
  <Pressable onPress={handleAuthenticate}>
95
101
  <Text>Authenticate</Text>
96
102
  </Pressable>
@@ -99,7 +105,11 @@ function LocalAuthScreen() {
99
105
  <Text>Cancel</Text>
100
106
  </Pressable>
101
107
  )}
102
- {authResult && <Text>{authResult.success ? 'Success' : `Failed: ${authResult.error}`}</Text>}
108
+ {authResult && (
109
+ <Text>
110
+ {authResult.success ? 'Success' : `Failed: ${authResult.error}`}
111
+ </Text>
112
+ )}
103
113
  </View>
104
114
  );
105
115
  }
@@ -136,14 +146,20 @@ function handleAuthenticate(): void {
136
146
 
137
147
  <template>
138
148
  <View>
139
- <Text>{{ hasHardware && isEnrolled ? 'Ready to authenticate' : 'No biometrics enrolled' }}</Text>
149
+ <Text>{{
150
+ hasHardware && isEnrolled
151
+ ? 'Ready to authenticate'
152
+ : 'No biometrics enrolled'
153
+ }}</Text>
140
154
  <Pressable @press="handleAuthenticate">
141
155
  <Text>Authenticate</Text>
142
156
  </Pressable>
143
157
  <Pressable v-if="Platform.OS === 'android'" @press="cancelAuthenticate">
144
158
  <Text>Cancel</Text>
145
159
  </Pressable>
146
- <Text v-if="authResult">{{ authResult.success ? 'Success' : `Failed: ${authResult.error}` }}</Text>
160
+ <Text v-if="authResult">{{
161
+ authResult.success ? 'Success' : `Failed: ${authResult.error}`
162
+ }}</Text>
147
163
  </View>
148
164
  </template>
149
165
  ```
@@ -165,7 +181,11 @@ import type { ILocalAuthenticationResult } from '@symbiote-native/local-auth/ang
165
181
  imports: [Pressable, Text, View],
166
182
  template: `
167
183
  <View>
168
- <Text>{{ hasHardware() && isEnrolled() ? 'Ready to authenticate' : 'No biometrics enrolled' }}</Text>
184
+ <Text>{{
185
+ hasHardware() && isEnrolled()
186
+ ? 'Ready to authenticate'
187
+ : 'No biometrics enrolled'
188
+ }}</Text>
169
189
  <Pressable (press)="handleAuthenticate()">
170
190
  <Text>Authenticate</Text>
171
191
  </Pressable>
@@ -175,7 +195,9 @@ import type { ILocalAuthenticationResult } from '@symbiote-native/local-auth/ang
175
195
  </Pressable>
176
196
  }
177
197
  @if (authResult(); as result) {
178
- <Text>{{ result.success ? 'Success' : 'Failed: ' + result.error }}</Text>
198
+ <Text>{{
199
+ result.success ? 'Success' : 'Failed: ' + result.error
200
+ }}</Text>
179
201
  }
180
202
  </View>
181
203
  `,
@@ -192,7 +214,9 @@ export class LocalAuthScreen {
192
214
  }
193
215
 
194
216
  handleAuthenticate(): void {
195
- authenticateAsync({ promptMessage: 'Confirm it is you' }).then(value => this.authResult.set(value));
217
+ authenticateAsync({ promptMessage: 'Confirm it is you' }).then(value =>
218
+ this.authResult.set(value),
219
+ );
196
220
  }
197
221
 
198
222
  handleCancel(): void {
@@ -229,7 +253,10 @@ from upstream's `LocalAuthentication.types.ts`, renamed with this repo's `I`-pre
229
253
  for exported types (`ts-js-best-practices`).
230
254
 
231
255
  ```ts
232
- import { authenticateAsync, hasHardwareAsync } from '@symbiote-native/local-auth';
256
+ import {
257
+ authenticateAsync,
258
+ hasHardwareAsync,
259
+ } from '@symbiote-native/local-auth';
233
260
  // or the framework-scoped entry points — identical surface, re-exported verbatim:
234
261
  import { authenticateAsync } from '@symbiote-native/local-auth/react';
235
262
  import { authenticateAsync } from '@symbiote-native/local-auth/vue';
@@ -241,7 +268,7 @@ import { authenticateAsync } from '@symbiote-native/local-auth/angular';
241
268
  - **`not_enrolled` on Android almost always means the device's own lock screen has no PIN,
242
269
  pattern, or password set.** A real symptom on a fresh emulator or factory-reset device:
243
270
  `authenticateAsync` resolves `{ success: false, error: 'not_enrolled', warning:
244
- 'KeyguardManager#isDeviceSecure() returned false' }`. This is **not** a missing app
271
+ 'KeyguardManager#isDeviceSecure() returned false' }`. This is **not** a missing app
245
272
  permission — the manifest permission this package needs is an ordinary build-time merge with
246
273
  no runtime prompt, so there's nothing for your app to request. The fix lives on the device:
247
274
  Settings → Security → Screen lock → set a PIN/pattern/password, then optionally enroll a
@@ -55,7 +55,8 @@ export async function authenticateAsync(options = {}) {
55
55
  throw new UnavailabilityError(NATIVE_MODULE_NAME, 'authenticateAsync');
56
56
  }
57
57
  if (options.promptMessage !== undefined) {
58
- invariant(typeof options.promptMessage === 'string' && options.promptMessage.length > 0, 'LocalAuthentication.authenticateAsync: `options.promptMessage` must be a non-empty string.');
58
+ invariant(typeof options.promptMessage === 'string' &&
59
+ options.promptMessage.length > 0, 'LocalAuthentication.authenticateAsync: `options.promptMessage` must be a non-empty string.');
59
60
  }
60
61
  return expoLocalAuthentication.authenticateAsync({
61
62
  ...options,
@@ -55,7 +55,8 @@ export async function authenticateAsync(options = {}) {
55
55
  throw new UnavailabilityError(NATIVE_MODULE_NAME, 'authenticateAsync');
56
56
  }
57
57
  if (options.promptMessage !== undefined) {
58
- invariant(typeof options.promptMessage === 'string' && options.promptMessage.length > 0, 'LocalAuthentication.authenticateAsync: `options.promptMessage` must be a non-empty string.');
58
+ invariant(typeof options.promptMessage === 'string' &&
59
+ options.promptMessage.length > 0, 'LocalAuthentication.authenticateAsync: `options.promptMessage` must be a non-empty string.');
59
60
  }
60
61
  return expoLocalAuthentication.authenticateAsync({
61
62
  ...options,
@@ -1 +1 @@
1
- {"version":3,"file":"local-authentication.js","sourceRoot":"","sources":["../../src/core/local-authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAQ1D,MAAM,kBAAkB,GAAG,2BAA2B,CAAC;AACvD,MAAM,sBAAsB,GAAG,cAAc,CAAC;AAC9C,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,IAAI,CAAC,uBAAuB,CAAC,gBAAgB,EAAE,CAAC;QAC9C,MAAM,IAAI,mBAAmB,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,uBAAuB,CAAC,gBAAgB,EAAE,CAAC;AACpD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iCAAiC;IACrD,IAAI,CAAC,uBAAuB,CAAC,iCAAiC,EAAE,CAAC;QAC/D,MAAM,IAAI,mBAAmB,CAAC,kBAAkB,EAAE,mCAAmC,CAAC,CAAC;IACzF,CAAC;IACD,OAAO,uBAAuB,CAAC,iCAAiC,EAAE,CAAC;AACrE,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,IAAI,CAAC,uBAAuB,CAAC,eAAe,EAAE,CAAC;QAC7C,MAAM,IA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,CAAC,qBAAqB,EAAE,CAAC;AACzD,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,UAAuC,EAAE;IAEzC,IAAI,CAAC,uBAAuB,CAAC,iBAAiB,EAAE,CAAC;QAC/C,MAAM,IAAI,mBAAmB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;IACzE,CAAC;IAED,IAAI,OAAO,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QACxC,SAAS,CACP,OAAO,OAAO,CAAC,aAAa,KAAK,QAAQ;YACvC,OAAO,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAClC,4FAA4F,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,uBAAuB,CAAC,iBAAiB,CAAC;QAC/C,GAAG,OAAO;QACV,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,sBAAsB;QAC9D,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,oBAAoB;KACzD,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,EAAE,CAAC;QAChD,MAAM,IAAI,mBAAmB,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAC;IAC1E,CAAC;IACD,MAAM,uBAAuB,CAAC,kBAAkB,EAAE,CAAC;AACrD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"native-module.js","sourceRoot":"","sources":["../../src/core/native-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAQxD,MAAM,qCAAqC,GAAG,yBAAyB,CAAC;AAgBxE,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAAmB,CACxD,qCAAqC,CACtC,CAAC"}
1
+ {"version":3,"file":"native-module.js","sourceRoot":"","sources":["../../src/core/native-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAQxD,MAAM,qCAAqC,GAAG,yBAAyB,CAAC;AAmBxE,MAAM,CAAC,MAAM,uBAAuB,GAClC,mBAAmB,CACjB,qCAAqC,CACtC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@symbiote-native/local-auth",
3
- "version": "0.2.0",
4
- "description": "expo-local-authentication wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, and Angular adapters. FaceID/TouchID on iOS, the Fingerprint/Biometric API on Android.",
3
+ "version": "0.4.0",
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": {
7
7
  "type": "git",
@@ -23,12 +23,20 @@
23
23
  "default": "./build/core/index.js"
24
24
  },
25
25
  "./vue": {
26
- "types": "./build/vue/index.d.ts",
27
- "default": "./build/vue/index.js"
26
+ "types": "./build/core/index.d.ts",
27
+ "default": "./build/core/index.js"
28
28
  },
29
29
  "./react": {
30
- "types": "./build/react/index.d.ts",
31
- "default": "./build/react/index.js"
30
+ "types": "./build/core/index.d.ts",
31
+ "default": "./build/core/index.js"
32
+ },
33
+ "./svelte": {
34
+ "types": "./build/core/index.d.ts",
35
+ "default": "./build/core/index.js"
36
+ },
37
+ "./solid": {
38
+ "types": "./build/core/index.d.ts",
39
+ "default": "./build/core/index.js"
32
40
  },
33
41
  "./angular": {
34
42
  "types": "./build-ngc/angular/index.d.ts",
@@ -54,15 +62,19 @@
54
62
  "invariant": "^2.2.4"
55
63
  },
56
64
  "peerDependencies": {
65
+ "@symbiote-native/angular": ">=0.6.2",
57
66
  "@symbiote-native/engine": ">=0.1.7",
67
+ "@symbiote-native/react": ">=0.2.8",
68
+ "@symbiote-native/solid": ">=0.0.1",
69
+ "@symbiote-native/svelte": ">=0.1.0",
70
+ "@symbiote-native/vue": ">=0.3.8",
58
71
  "@angular/core": ">=20",
59
72
  "@vue/runtime-core": "^3.5.13",
60
73
  "react": ">=19.0.0",
61
74
  "react-native": ">=0.86",
62
- "vue": ">=3.5.0",
63
- "@symbiote-native/angular": "0.6.2",
64
- "@symbiote-native/react": "0.2.8",
65
- "@symbiote-native/vue": "0.3.8"
75
+ "solid-js": ">=1.9.0",
76
+ "svelte": ">=5.56.0",
77
+ "vue": ">=3.5.0"
66
78
  },
67
79
  "peerDependenciesMeta": {
68
80
  "@symbiote-native/angular": {
@@ -71,6 +83,12 @@
71
83
  "@symbiote-native/react": {
72
84
  "optional": true
73
85
  },
86
+ "@symbiote-native/solid": {
87
+ "optional": true
88
+ },
89
+ "@symbiote-native/svelte": {
90
+ "optional": true
91
+ },
74
92
  "@symbiote-native/vue": {
75
93
  "optional": true
76
94
  },
@@ -83,25 +101,35 @@
83
101
  "react": {
84
102
  "optional": true
85
103
  },
104
+ "solid-js": {
105
+ "optional": true
106
+ },
107
+ "svelte": {
108
+ "optional": true
109
+ },
86
110
  "vue": {
87
111
  "optional": true
88
112
  }
89
113
  },
90
114
  "devDependencies": {
91
- "@angular/compiler": "^22",
92
- "@angular/compiler-cli": "^22",
93
- "@angular/core": "^22",
115
+ "@angular/compiler": "~22.0.8",
116
+ "@angular/compiler-cli": "~22.0.8",
117
+ "@angular/core": "~22.0.8",
94
118
  "@types/invariant": "^2.2.37",
95
119
  "@types/node": "^26.0.0",
96
120
  "@types/react": "^19.2.0",
97
121
  "@vue/runtime-core": "^3.5.13",
98
122
  "react": "19.2.3",
123
+ "solid-js": "^1.9.14",
124
+ "svelte": "^5.56.0",
99
125
  "typescript": "~6.0.0",
100
- "@symbiote-native/angular": "0.6.2",
101
- "@symbiote-native/engine": "0.1.7",
102
- "@symbiote-native/react": "0.2.8",
103
- "@symbiote-native/test-utils": "0.1.6",
104
- "@symbiote-native/vue": "0.3.8"
126
+ "@symbiote-native/angular": "0.8.0",
127
+ "@symbiote-native/engine": "0.3.0",
128
+ "@symbiote-native/react": "0.4.0",
129
+ "@symbiote-native/solid": "0.1.0",
130
+ "@symbiote-native/svelte": "0.3.0",
131
+ "@symbiote-native/test-utils": "0.2.0",
132
+ "@symbiote-native/vue": "0.5.0"
105
133
  },
106
134
  "scripts": {
107
135
  "typecheck": "tsc --build",
@@ -28,9 +28,14 @@ export async function hasHardwareAsync(): Promise<boolean> {
28
28
  * multiple authentication methods — e.g. `[FINGERPRINT, FACIAL_RECOGNITION]` means the device
29
29
  * supports both. Returns an empty array if none are supported.
30
30
  */
31
- export async function supportedAuthenticationTypesAsync(): Promise<AuthenticationType[]> {
31
+ export async function supportedAuthenticationTypesAsync(): Promise<
32
+ AuthenticationType[]
33
+ > {
32
34
  if (!expoLocalAuthentication.supportedAuthenticationTypesAsync) {
33
- throw new UnavailabilityError(NATIVE_MODULE_NAME, 'supportedAuthenticationTypesAsync');
35
+ throw new UnavailabilityError(
36
+ NATIVE_MODULE_NAME,
37
+ 'supportedAuthenticationTypesAsync',
38
+ );
34
39
  }
35
40
  return expoLocalAuthentication.supportedAuthenticationTypesAsync();
36
41
  }
@@ -72,7 +77,8 @@ export async function authenticateAsync(
72
77
 
73
78
  if (options.promptMessage !== undefined) {
74
79
  invariant(
75
- typeof options.promptMessage === 'string' && options.promptMessage.length > 0,
80
+ typeof options.promptMessage === 'string' &&
81
+ options.promptMessage.length > 0,
76
82
  'LocalAuthentication.authenticateAsync: `options.promptMessage` must be a non-empty string.',
77
83
  );
78
84
  }
@@ -17,11 +17,15 @@ export type INativeLocalAuthenticationModule = {
17
17
  isEnrolledAsync?(): Promise<boolean>;
18
18
  getEnrolledLevelAsync?(): Promise<SecurityLevel>;
19
19
  authenticateAsync?(
20
- options: ILocalAuthenticationOptions & { promptMessage: string; cancelLabel: string },
20
+ options: ILocalAuthenticationOptions & {
21
+ promptMessage: string;
22
+ cancelLabel: string;
23
+ },
21
24
  ): Promise<ILocalAuthenticationResult>;
22
25
  cancelAuthenticate?(): Promise<void>;
23
26
  };
24
27
 
25
- export const expoLocalAuthentication = requireNativeModule<INativeLocalAuthenticationModule>(
26
- EXPO_LOCAL_AUTHENTICATION_MODULE_NAME,
27
- );
28
+ export const expoLocalAuthentication =
29
+ requireNativeModule<INativeLocalAuthenticationModule>(
30
+ EXPO_LOCAL_AUTHENTICATION_MODULE_NAME,
31
+ );
@@ -1 +0,0 @@
1
- export * from '../core';
@@ -1,6 +0,0 @@
1
- // @symbiote-native/local-auth/react: the React entry over the framework-agnostic core.
2
- // Upstream ships free async functions and two enums, no per-instance state and no event
3
- // stream (unlike the sensor family in @symbiote-native/sensors) — there is nothing for a hook
4
- // to wrap, so this is a plain re-export, mirroring how Pedometer's free functions pass through
5
- // packages/sensors/src/react/index.ts untouched.
6
- export * from '../core/index.js';
@@ -1 +0,0 @@
1
- export * from '../core';
@@ -1,4 +0,0 @@
1
- // @symbiote-native/local-auth/vue: the Vue entry over the framework-agnostic core. Same
2
- // reasoning as the React entry — no per-instance state or event stream to wire onto Vue's
3
- // reactivity, so this is a plain re-export.
4
- export * from '../core/index.js';
@@ -1,6 +0,0 @@
1
- // @symbiote-native/local-auth/react: the React entry over the framework-agnostic core.
2
- // Upstream ships free async functions and two enums, no per-instance state and no event
3
- // stream (unlike the sensor family in @symbiote-native/sensors) — there is nothing for a hook
4
- // to wrap, so this is a plain re-export, mirroring how Pedometer's free functions pass through
5
- // packages/sensors/src/react/index.ts untouched.
6
- export * from '../core';
package/src/vue/index.ts DELETED
@@ -1,4 +0,0 @@
1
- // @symbiote-native/local-auth/vue: the Vue entry over the framework-agnostic core. Same
2
- // reasoning as the React entry — no per-instance state or event stream to wire onto Vue's
3
- // reactivity, so this is a plain re-export.
4
- export * from '../core';