@capgo/capacitor-native-biometric 8.1.0 → 8.3.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
@@ -119,6 +119,17 @@ This plugin does NOT provide:
119
119
  - ❌ Server-side authentication or validation
120
120
  - ❌ Root/jailbreak detection (use [@capgo/capacitor-is-root](https://github.com/Cap-go/capacitor-is-root))
121
121
 
122
+ ### Recent Security Improvements (v8.2.0+)
123
+
124
+ **Android Encryption Enhancement**: The Android implementation now uses properly randomized Initialization Vectors (IVs) for AES-GCM encryption of stored credentials. Previous versions used a fixed IV, which is a cryptographic vulnerability.
125
+
126
+ **Automatic Migration**: The plugin automatically handles credentials encrypted with the older method:
127
+ - When reading credentials, it first attempts the new secure format, then falls back to the legacy format if needed
128
+ - When saving credentials, they are always encrypted using the new secure format
129
+ - No action required from users - migration happens transparently on first credential save after update
130
+
131
+ **Recommendation**: After updating to v8.2.0+, users should re-save their credentials to ensure they're encrypted with the improved format. This happens automatically when users authenticate and save credentials again.
132
+
122
133
  ## Installation (Only supports Capacitor 7)
123
134
 
124
135
  - `npm i @capgo/capacitor-native-biometric`
@@ -590,13 +601,13 @@ The `biometryType` field indicates what biometric hardware is present, but **har
590
601
 
591
602
  ## Web Platform
592
603
 
593
- This plugin does not support web browsers. On web:
594
- - `isAvailable()` returns `{ isAvailable: false, ... }` (no error thrown)
604
+ This plugin provides a dummy implementation for in-browser development and testing. On web:
605
+ - `isAvailable()` returns `{ isAvailable: true, ... }` simulating biometric availability
595
606
  - `addListener()` returns a no-op handle
596
- - `verifyIdentity()` throws an error
597
- - Credential methods throw errors
607
+ - `verifyIdentity()` always succeeds (no actual authentication)
608
+ - Credential methods use in-memory storage (credentials stored in a Map, cleared on page refresh)
598
609
 
599
- This allows you to safely check availability on web without try/catch, but authentication features are only available on iOS and Android.
610
+ This allows you to develop and test your app in the browser without errors. Note that real biometric authentication is only available on iOS and Android platforms.
600
611
 
601
612
  ## Contributors
602
613
 
@@ -40,6 +40,7 @@ import java.security.UnrecoverableEntryException;
40
40
  import java.security.cert.CertificateException;
41
41
  import java.util.ArrayList;
42
42
  import java.util.Objects;
43
+ import javax.crypto.BadPaddingException;
43
44
  import javax.crypto.Cipher;
44
45
  import javax.crypto.CipherInputStream;
45
46
  import javax.crypto.CipherOutputStream;
@@ -73,7 +74,7 @@ public class NativeBiometric extends Plugin {
73
74
  private static final String TRANSFORMATION = "AES/GCM/NoPadding";
74
75
  private static final String RSA_MODE = "RSA/ECB/PKCS1Padding";
75
76
  private static final String AES_MODE = "AES/ECB/PKCS7Padding";
76
- private static final byte[] FIXED_IV = new byte[12];
77
+ private static final int GCM_IV_LENGTH = 12;
77
78
  private static final String ENCRYPTED_KEY = "NativeBiometricKey";
78
79
  private static final String NATIVE_BIOMETRIC_SHARED_PREFERENCES = "NativeBiometricSharedPreferences";
79
80
 
@@ -363,18 +364,58 @@ public class NativeBiometric extends Plugin {
363
364
  private String encryptString(String stringToEncrypt, String KEY_ALIAS) throws GeneralSecurityException, IOException {
364
365
  Cipher cipher;
365
366
  cipher = Cipher.getInstance(TRANSFORMATION);
366
- cipher.init(Cipher.ENCRYPT_MODE, getKey(KEY_ALIAS), new GCMParameterSpec(128, FIXED_IV));
367
- byte[] encodedBytes = cipher.doFinal(stringToEncrypt.getBytes(StandardCharsets.UTF_8));
368
- return Base64.encodeToString(encodedBytes, Base64.DEFAULT);
367
+
368
+ // Generate a random IV for each encryption operation
369
+ byte[] iv = new byte[GCM_IV_LENGTH];
370
+ SecureRandom secureRandom = new SecureRandom();
371
+ secureRandom.nextBytes(iv);
372
+
373
+ cipher.init(Cipher.ENCRYPT_MODE, getKey(KEY_ALIAS), new GCMParameterSpec(128, iv));
374
+ byte[] encryptedBytes = cipher.doFinal(stringToEncrypt.getBytes(StandardCharsets.UTF_8));
375
+
376
+ // Prepend IV to the encrypted data
377
+ byte[] combined = new byte[iv.length + encryptedBytes.length];
378
+ System.arraycopy(iv, 0, combined, 0, iv.length);
379
+ System.arraycopy(encryptedBytes, 0, combined, iv.length, encryptedBytes.length);
380
+
381
+ return Base64.encodeToString(combined, Base64.DEFAULT);
369
382
  }
370
383
 
371
384
  private String decryptString(String stringToDecrypt, String KEY_ALIAS) throws GeneralSecurityException, IOException {
372
- byte[] encryptedData = Base64.decode(stringToDecrypt, Base64.DEFAULT);
385
+ byte[] combined = Base64.decode(stringToDecrypt, Base64.DEFAULT);
373
386
 
374
- Cipher cipher;
375
- cipher = Cipher.getInstance(TRANSFORMATION);
376
- cipher.init(Cipher.DECRYPT_MODE, getKey(KEY_ALIAS), new GCMParameterSpec(128, FIXED_IV));
377
- byte[] decryptedData = cipher.doFinal(encryptedData);
387
+ // Try new format first (IV prepended to ciphertext)
388
+ // New format: 12-byte IV + ciphertext (plaintext + 16-byte GCM auth tag)
389
+ // We check for > GCM_IV_LENGTH to ensure there's at least some ciphertext beyond just the IV
390
+ // The cipher's doFinal() will validate the auth tag and fail if data is malformed
391
+ if (combined.length >= GCM_IV_LENGTH + 1) {
392
+ try {
393
+ // Extract IV from the beginning of the data
394
+ byte[] iv = new byte[GCM_IV_LENGTH];
395
+ byte[] encryptedData = new byte[combined.length - GCM_IV_LENGTH];
396
+ System.arraycopy(combined, 0, iv, 0, GCM_IV_LENGTH);
397
+ System.arraycopy(combined, GCM_IV_LENGTH, encryptedData, 0, encryptedData.length);
398
+
399
+ Cipher cipher = Cipher.getInstance(TRANSFORMATION);
400
+ cipher.init(Cipher.DECRYPT_MODE, getKey(KEY_ALIAS), new GCMParameterSpec(128, iv));
401
+ byte[] decryptedData = cipher.doFinal(encryptedData);
402
+ return new String(decryptedData, StandardCharsets.UTF_8);
403
+ } catch (BadPaddingException e) {
404
+ // Authentication tag verification failed (AEADBadTagException) or padding error
405
+ // BadPaddingException is the parent class of AEADBadTagException
406
+ // Likely means data was encrypted with legacy format - fall through to legacy decryption
407
+ } catch (GeneralSecurityException e) {
408
+ // Other security exceptions should not be masked - rethrow
409
+ throw e;
410
+ }
411
+ }
412
+
413
+ // Fallback to legacy format (FIXED_IV - all zeros)
414
+ // This branch handles credentials encrypted with the old vulnerable method
415
+ byte[] LEGACY_FIXED_IV = new byte[12]; // All zeros by default
416
+ Cipher cipher = Cipher.getInstance(TRANSFORMATION);
417
+ cipher.init(Cipher.DECRYPT_MODE, getKey(KEY_ALIAS), new GCMParameterSpec(128, LEGACY_FIXED_IV));
418
+ byte[] decryptedData = cipher.doFinal(combined);
378
419
  return new String(decryptedData, StandardCharsets.UTF_8);
379
420
  }
380
421
 
@@ -410,8 +451,7 @@ public class NativeBiometric extends Plugin {
410
451
  KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT
411
452
  )
412
453
  .setBlockModes(KeyProperties.BLOCK_MODE_GCM)
413
- .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE)
414
- .setRandomizedEncryptionRequired(false);
454
+ .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE);
415
455
 
416
456
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
417
457
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || Build.VERSION.SDK_INT > 34) {
package/dist/esm/web.d.ts CHANGED
@@ -2,6 +2,12 @@ import { WebPlugin } from '@capacitor/core';
2
2
  import type { PluginListenerHandle } from '@capacitor/core';
3
3
  import type { NativeBiometricPlugin, AvailableResult, BiometricOptions, GetCredentialOptions, SetCredentialOptions, DeleteCredentialOptions, IsCredentialsSavedOptions, IsCredentialsSavedResult, Credentials, BiometryChangeListener } from './definitions';
4
4
  export declare class NativeBiometricWeb extends WebPlugin implements NativeBiometricPlugin {
5
+ /**
6
+ * In-memory credential storage for browser development/testing.
7
+ * Credentials are stored temporarily and cleared on page refresh.
8
+ * This is NOT secure storage and should only be used for development purposes.
9
+ */
10
+ private credentialStore;
5
11
  constructor();
6
12
  isAvailable(): Promise<AvailableResult>;
7
13
  addListener(_eventName: 'biometryChange', _listener: BiometryChangeListener): Promise<PluginListenerHandle>;
package/dist/esm/web.js CHANGED
@@ -3,15 +3,22 @@ import { BiometryType, AuthenticationStrength } from './definitions';
3
3
  export class NativeBiometricWeb extends WebPlugin {
4
4
  constructor() {
5
5
  super();
6
+ /**
7
+ * In-memory credential storage for browser development/testing.
8
+ * Credentials are stored temporarily and cleared on page refresh.
9
+ * This is NOT secure storage and should only be used for development purposes.
10
+ */
11
+ this.credentialStore = new Map();
6
12
  }
7
13
  isAvailable() {
8
- // Web platform: biometrics not available, but return structured response
14
+ // Web platform: return a dummy implementation for development/testing
15
+ // Using TOUCH_ID as a generic placeholder for simulated biometric authentication
9
16
  return Promise.resolve({
10
- isAvailable: false,
11
- authenticationStrength: AuthenticationStrength.NONE,
12
- biometryType: BiometryType.NONE,
13
- deviceIsSecure: false,
14
- strongBiometryIsAvailable: false,
17
+ isAvailable: true,
18
+ authenticationStrength: AuthenticationStrength.STRONG,
19
+ biometryType: BiometryType.TOUCH_ID,
20
+ deviceIsSecure: true,
21
+ strongBiometryIsAvailable: true,
15
22
  });
16
23
  }
17
24
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -23,26 +30,40 @@ export class NativeBiometricWeb extends WebPlugin {
23
30
  },
24
31
  };
25
32
  }
33
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
26
34
  verifyIdentity(_options) {
27
- console.log('verifyIdentity', _options);
28
- throw new Error('Biometric authentication is not available on web platform.');
35
+ console.log('verifyIdentity (dummy implementation)');
36
+ // Dummy implementation: always succeeds for browser testing
37
+ return Promise.resolve();
29
38
  }
30
39
  getCredentials(_options) {
31
- console.log('getCredentials', _options);
32
- throw new Error('Credential storage is not available on web platform.');
40
+ console.log('getCredentials (dummy implementation)', { server: _options.server });
41
+ // Dummy implementation: retrieve from in-memory store
42
+ const credentials = this.credentialStore.get(_options.server);
43
+ if (!credentials) {
44
+ throw new Error('No credentials found for the specified server');
45
+ }
46
+ return Promise.resolve(credentials);
33
47
  }
34
48
  setCredentials(_options) {
35
- console.log('setCredentials', _options);
36
- throw new Error('Credential storage is not available on web platform.');
49
+ console.log('setCredentials (dummy implementation)', { server: _options.server });
50
+ // Dummy implementation: store in memory
51
+ this.credentialStore.set(_options.server, {
52
+ username: _options.username,
53
+ password: _options.password,
54
+ });
55
+ return Promise.resolve();
37
56
  }
38
57
  deleteCredentials(_options) {
39
- console.log('deleteCredentials', _options);
40
- throw new Error('Credential storage is not available on web platform.');
58
+ console.log('deleteCredentials (dummy implementation)', { server: _options.server });
59
+ // Dummy implementation: remove from in-memory store
60
+ this.credentialStore.delete(_options.server);
61
+ return Promise.resolve();
41
62
  }
42
63
  isCredentialsSaved(_options) {
43
- console.log('isCredentialsSaved', _options);
44
- // Return false on web - no credentials can be saved
45
- return Promise.resolve({ isSaved: false });
64
+ console.log('isCredentialsSaved (dummy implementation)', { server: _options.server });
65
+ // Dummy implementation: check in-memory store
66
+ return Promise.resolve({ isSaved: this.credentialStore.has(_options.server) });
46
67
  }
47
68
  async getPluginVersion() {
48
69
  return { version: 'web' };
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAe5C,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAErE,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAC/C;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,WAAW;QACT,yEAAyE;QACzE,OAAO,OAAO,CAAC,OAAO,CAAC;YACrB,WAAW,EAAE,KAAK;YAClB,sBAAsB,EAAE,sBAAsB,CAAC,IAAI;YACnD,YAAY,EAAE,YAAY,CAAC,IAAI;YAC/B,cAAc,EAAE,KAAK;YACrB,yBAAyB,EAAE,KAAK;SACjC,CAAC,CAAC;IACL,CAAC;IAED,6DAA6D;IAC7D,KAAK,CAAC,WAAW,CAAC,UAA4B,EAAE,SAAiC;QAC/E,iDAAiD;QACjD,OAAO;YACL,MAAM,EAAE,KAAK,IAAI,EAAE;gBACjB,2BAA2B;YAC7B,CAAC;SACF,CAAC;IACJ,CAAC;IAED,cAAc,CAAC,QAA2B;QACxC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAChF,CAAC;IAED,cAAc,CAAC,QAA8B;QAC3C,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IAED,cAAc,CAAC,QAA8B;QAC3C,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IAED,iBAAiB,CAAC,QAAiC;QACjD,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC;QAC3C,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IAED,kBAAkB,CAAC,QAAmC;QACpD,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;QAC5C,oDAAoD;QACpD,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport type { PluginListenerHandle } from '@capacitor/core';\n\nimport type {\n NativeBiometricPlugin,\n AvailableResult,\n BiometricOptions,\n GetCredentialOptions,\n SetCredentialOptions,\n DeleteCredentialOptions,\n IsCredentialsSavedOptions,\n IsCredentialsSavedResult,\n Credentials,\n BiometryChangeListener,\n} from './definitions';\nimport { BiometryType, AuthenticationStrength } from './definitions';\n\nexport class NativeBiometricWeb extends WebPlugin implements NativeBiometricPlugin {\n constructor() {\n super();\n }\n\n isAvailable(): Promise<AvailableResult> {\n // Web platform: biometrics not available, but return structured response\n return Promise.resolve({\n isAvailable: false,\n authenticationStrength: AuthenticationStrength.NONE,\n biometryType: BiometryType.NONE,\n deviceIsSecure: false,\n strongBiometryIsAvailable: false,\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async addListener(_eventName: 'biometryChange', _listener: BiometryChangeListener): Promise<PluginListenerHandle> {\n // Web platform: no-op, but return a valid handle\n return {\n remove: async () => {\n // Nothing to remove on web\n },\n };\n }\n\n verifyIdentity(_options?: BiometricOptions): Promise<void> {\n console.log('verifyIdentity', _options);\n throw new Error('Biometric authentication is not available on web platform.');\n }\n\n getCredentials(_options: GetCredentialOptions): Promise<Credentials> {\n console.log('getCredentials', _options);\n throw new Error('Credential storage is not available on web platform.');\n }\n\n setCredentials(_options: SetCredentialOptions): Promise<void> {\n console.log('setCredentials', _options);\n throw new Error('Credential storage is not available on web platform.');\n }\n\n deleteCredentials(_options: DeleteCredentialOptions): Promise<void> {\n console.log('deleteCredentials', _options);\n throw new Error('Credential storage is not available on web platform.');\n }\n\n isCredentialsSaved(_options: IsCredentialsSavedOptions): Promise<IsCredentialsSavedResult> {\n console.log('isCredentialsSaved', _options);\n // Return false on web - no credentials can be saved\n return Promise.resolve({ isSaved: false });\n }\n\n async getPluginVersion(): Promise<{ version: string }> {\n return { version: 'web' };\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAe5C,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAErE,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAQ/C;QACE,KAAK,EAAE,CAAC;QARV;;;;WAIG;QACK,o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CAAC,MAAM,EAAE;YACxC,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;SAC5B,CAAC,CAAC;QACH,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,iBAAiB,CAAC,QAAiC;QACjD,OAAO,CAAC,GAAG,CAAC,0CAA0C,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QACrF,oDAAoD;QACpD,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC7C,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,kBAAkB,CAAC,QAAmC;QACpD,OAAO,CAAC,GAAG,CAAC,2CAA2C,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QACtF,8CAA8C;QAC9C,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACjF,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport type { PluginListenerHandle } from '@capacitor/core';\n\nimport type {\n NativeBiometricPlugin,\n AvailableResult,\n BiometricOptions,\n GetCredentialOptions,\n SetCredentialOptions,\n DeleteCredentialOptions,\n IsCredentialsSavedOptions,\n IsCredentialsSavedResult,\n Credentials,\n BiometryChangeListener,\n} from './definitions';\nimport { BiometryType, AuthenticationStrength } from './definitions';\n\nexport class NativeBiometricWeb extends WebPlugin implements NativeBiometricPlugin {\n /**\n * In-memory credential storage for browser development/testing.\n * Credentials are stored temporarily and cleared on page refresh.\n * This is NOT secure storage and should only be used for development purposes.\n */\n private credentialStore: Map<string, Credentials> = new Map();\n\n constructor() {\n super();\n }\n\n isAvailable(): Promise<AvailableResult> {\n // Web platform: return a dummy implementation for development/testing\n // Using TOUCH_ID as a generic placeholder for simulated biometric authentication\n return Promise.resolve({\n isAvailable: true,\n authenticationStrength: AuthenticationStrength.STRONG,\n biometryType: BiometryType.TOUCH_ID,\n deviceIsSecure: true,\n strongBiometryIsAvailable: true,\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async addListener(_eventName: 'biometryChange', _listener: BiometryChangeListener): Promise<PluginListenerHandle> {\n // Web platform: no-op, but return a valid handle\n return {\n remove: async () => {\n // Nothing to remove on web\n },\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n verifyIdentity(_options?: BiometricOptions): Promise<void> {\n console.log('verifyIdentity (dummy implementation)');\n // Dummy implementation: always succeeds for browser testing\n return Promise.resolve();\n }\n\n getCredentials(_options: GetCredentialOptions): Promise<Credentials> {\n console.log('getCredentials (dummy implementation)', { server: _options.server });\n // Dummy implementation: retrieve from in-memory store\n const credentials = this.credentialStore.get(_options.server);\n if (!credentials) {\n throw new Error('No credentials found for the specified server');\n }\n return Promise.resolve(credentials);\n }\n\n setCredentials(_options: SetCredentialOptions): Promise<void> {\n console.log('setCredentials (dummy implementation)', { server: _options.server });\n // Dummy implementation: store in memory\n this.credentialStore.set(_options.server, {\n username: _options.username,\n password: _options.password,\n });\n return Promise.resolve();\n }\n\n deleteCredentials(_options: DeleteCredentialOptions): Promise<void> {\n console.log('deleteCredentials (dummy implementation)', { server: _options.server });\n // Dummy implementation: remove from in-memory store\n this.credentialStore.delete(_options.server);\n return Promise.resolve();\n }\n\n isCredentialsSaved(_options: IsCredentialsSavedOptions): Promise<IsCredentialsSavedResult> {\n console.log('isCredentialsSaved (dummy implementation)', { server: _options.server });\n // Dummy implementation: check in-memory store\n return Promise.resolve({ isSaved: this.credentialStore.has(_options.server) });\n }\n\n async getPluginVersion(): Promise<{ version: string }> {\n return { version: 'web' };\n }\n}\n"]}
@@ -120,15 +120,22 @@ const NativeBiometric = core.registerPlugin('NativeBiometric', {
120
120
  class NativeBiometricWeb extends core.WebPlugin {
121
121
  constructor() {
122
122
  super();
123
+ /**
124
+ * In-memory credential storage for browser development/testing.
125
+ * Credentials are stored temporarily and cleared on page refresh.
126
+ * This is NOT secure storage and should only be used for development purposes.
127
+ */
128
+ this.credentialStore = new Map();
123
129
  }
124
130
  isAvailable() {
125
- // Web platform: biometrics not available, but return structured response
131
+ // Web platform: return a dummy implementation for development/testing
132
+ // Using TOUCH_ID as a generic placeholder for simulated biometric authentication
126
133
  return Promise.resolve({
127
- isAvailable: false,
128
- authenticationStrength: exports.AuthenticationStrength.NONE,
129
- biometryType: exports.BiometryType.NONE,
130
- deviceIsSecure: false,
131
- strongBiometryIsAvailable: false,
134
+ isAvailable: true,
135
+ authenticationStrength: exports.AuthenticationStrength.STRONG,
136
+ biometryType: exports.BiometryType.TOUCH_ID,
137
+ deviceIsSecure: true,
138
+ strongBiometryIsAvailable: true,
132
139
  });
133
140
  }
134
141
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -140,26 +147,40 @@ class NativeBiometricWeb extends core.WebPlugin {
140
147
  },
141
148
  };
142
149
  }
150
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
143
151
  verifyIdentity(_options) {
144
- console.log('verifyIdentity', _options);
145
- throw new Error('Biometric authentication is not available on web platform.');
152
+ console.log('verifyIdentity (dummy implementation)');
153
+ // Dummy implementation: always succeeds for browser testing
154
+ return Promise.resolve();
146
155
  }
147
156
  getCredentials(_options) {
148
- console.log('getCredentials', _options);
149
- throw new Error('Credential storage is not available on web platform.');
157
+ console.log('getCredentials (dummy implementation)', { server: _options.server });
158
+ // Dummy implementation: retrieve from in-memory store
159
+ const credentials = this.credentialStore.get(_options.server);
160
+ if (!credentials) {
161
+ throw new Error('No credentials found for the specified server');
162
+ }
163
+ return Promise.resolve(credentials);
150
164
  }
151
165
  setCredentials(_options) {
152
- console.log('setCredentials', _options);
153
- throw new Error('Credential storage is not available on web platform.');
166
+ console.log('setCredentials (dummy implementation)', { server: _options.server });
167
+ // Dummy implementation: store in memory
168
+ this.credentialStore.set(_options.server, {
169
+ username: _options.username,
170
+ password: _options.password,
171
+ });
172
+ return Promise.resolve();
154
173
  }
155
174
  deleteCredentials(_options) {
156
- console.log('deleteCredentials', _options);
157
- throw new Error('Credential storage is not available on web platform.');
175
+ console.log('deleteCredentials (dummy implementation)', { server: _options.server });
176
+ // Dummy implementation: remove from in-memory store
177
+ this.credentialStore.delete(_options.server);
178
+ return Promise.resolve();
158
179
  }
159
180
  isCredentialsSaved(_options) {
160
- console.log('isCredentialsSaved', _options);
161
- // Return false on web - no credentials can be saved
162
- return Promise.resolve({ isSaved: false });
181
+ console.log('isCredentialsSaved (dummy implementation)', { server: _options.server });
182
+ // Dummy implementation: check in-memory store
183
+ return Promise.resolve({ isSaved: this.credentialStore.has(_options.server) });
163
184
  }
164
185
  async getPluginVersion() {
165
186
  return { version: 'web' };
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var BiometryType;\n(function (BiometryType) {\n // Android, iOS\n BiometryType[BiometryType[\"NONE\"] = 0] = \"NONE\";\n // iOS\n BiometryType[BiometryType[\"TOUCH_ID\"] = 1] = \"TOUCH_ID\";\n // iOS\n BiometryType[BiometryType[\"FACE_ID\"] = 2] = \"FACE_ID\";\n // Android\n BiometryType[BiometryType[\"FINGERPRINT\"] = 3] = \"FINGERPRINT\";\n // Android\n BiometryType[BiometryType[\"FACE_AUTHENTICATION\"] = 4] = \"FACE_AUTHENTICATION\";\n // Android\n BiometryType[BiometryType[\"IRIS_AUTHENTICATION\"] = 5] = \"IRIS_AUTHENTICATION\";\n // Android\n BiometryType[BiometryType[\"MULTIPLE\"] = 6] = \"MULTIPLE\";\n // Android - Device credentials (PIN, pattern, or password)\n BiometryType[BiometryType[\"DEVICE_CREDENTIAL\"] = 7] = \"DEVICE_CREDENTIAL\";\n})(BiometryType || (BiometryType = {}));\nexport var AuthenticationStrength;\n(function (AuthenticationStrength) {\n /**\n * No authentication available, even if PIN is available but useFallback = false\n */\n AuthenticationStrength[AuthenticationStrength[\"NONE\"] = 0] = \"NONE\";\n /**\n * Strong authentication: Face ID on iOS, fingerprints on devices that consider fingerprints strong (Android).\n * Note: PIN/pattern/password is NEVER considered STRONG, even when useFallback = true.\n */\n AuthenticationStrength[AuthenticationStrength[\"STRONG\"] = 1] = \"STRONG\";\n /**\n * Weak authentication: Face authentication on Android devices that consider face weak,\n * or PIN/pattern/password if useFallback = true (PIN is always WEAK, never STRONG).\n */\n AuthenticationStrength[AuthenticationStrength[\"WEAK\"] = 2] = \"WEAK\";\n})(AuthenticationStrength || (AuthenticationStrength = {}));\n/**\n * Biometric authentication error codes.\n * These error codes are used in both isAvailable() and verifyIdentity() methods.\n *\n * Keep this in sync with BiometricAuthError in README.md\n * Update whenever `convertToPluginErrorCode` functions are modified\n */\nexport var BiometricAuthError;\n(function (BiometricAuthError) {\n /**\n * Unknown error occurred\n */\n BiometricAuthError[BiometricAuthError[\"UNKNOWN_ERROR\"] = 0] = \"UNKNOWN_ERROR\";\n /**\n * Biometrics are unavailable (no hardware or hardware error)\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"BIOMETRICS_UNAVAILABLE\"] = 1] = \"BIOMETRICS_UNAVAILABLE\";\n /**\n * User has been locked out due to too many failed attempts\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"USER_LOCKOUT\"] = 2] = \"USER_LOCKOUT\";\n /**\n * No biometrics are enrolled on the device\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"BIOMETRICS_NOT_ENROLLED\"] = 3] = \"BIOMETRICS_NOT_ENROLLED\";\n /**\n * User is temporarily locked out (Android: 30 second lockout)\n * Platform: Android\n */\n BiometricAuthError[BiometricAuthError[\"USER_TEMPORARY_LOCKOUT\"] = 4] = \"USER_TEMPORARY_LOCKOUT\";\n /**\n * Authentication failed (user did not authenticate successfully)\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"AUTHENTICATION_FAILED\"] = 10] = \"AUTHENTICATION_FAILED\";\n /**\n * App canceled the authentication (iOS only)\n * Platform: iOS\n */\n BiometricAuthError[BiometricAuthError[\"APP_CANCEL\"] = 11] = \"APP_CANCEL\";\n /**\n * Invalid context (iOS only)\n * Platform: iOS\n */\n BiometricAuthError[BiometricAuthError[\"INVALID_CONTEXT\"] = 12] = \"INVALID_CONTEXT\";\n /**\n * Authentication was not interactive (iOS only)\n * Platform: iOS\n */\n BiometricAuthError[BiometricAuthError[\"NOT_INTERACTIVE\"] = 13] = \"NOT_INTERACTIVE\";\n /**\n * Passcode/PIN is not set on the device\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"PASSCODE_NOT_SET\"] = 14] = \"PASSCODE_NOT_SET\";\n /**\n * System canceled the authentication (e.g., due to screen lock)\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"SYSTEM_CANCEL\"] = 15] = \"SYSTEM_CANCEL\";\n /**\n * User canceled the authentication\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"USER_CANCEL\"] = 16] = \"USER_CANCEL\";\n /**\n * User chose to use fallback authentication method\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"USER_FALLBACK\"] = 17] = \"USER_FALLBACK\";\n})(BiometricAuthError || (BiometricAuthError = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst NativeBiometric = registerPlugin('NativeBiometric', {\n web: () => import('./web').then((m) => new m.NativeBiometricWeb()),\n});\nexport * from './definitions';\nexport { NativeBiometric };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { BiometryType, AuthenticationStrength } from './definitions';\nexport class NativeBiometricWeb extends WebPlugin {\n constructor() {\n super();\n }\n isAvailable() {\n // Web platform: biometrics not available, but return structured response\n return Promise.resolve({\n isAvailable: false,\n authenticationStrength: AuthenticationStrength.NONE,\n biometryType: BiometryType.NONE,\n deviceIsSecure: false,\n strongBiometryIsAvailable: false,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async addListener(_eventName, _listener) {\n // Web platform: no-op, but return a valid handle\n return {\n remove: async () => {\n // Nothing to remove on web\n },\n };\n }\n verifyIdentity(_options) {\n console.log('verifyIdentity', _options);\n throw new Error('Biometric authentication is not available on web platform.');\n }\n getCredentials(_options) {\n console.log('getCredentials', _options);\n throw new Error('Credential storage is not available on web platform.');\n }\n setCredentials(_options) {\n console.log('setCredentials', _options);\n throw new Error('Credential storage is not available on web platform.');\n }\n deleteCredentials(_options) {\n console.log('deleteCredentials', _options);\n throw new Error('Credential storage is not available on web platform.');\n }\n isCredentialsSaved(_options) {\n console.log('isCredentialsSaved', _options);\n // Return false on web - no credentials can be saved\n return Promise.resolve({ isSaved: false });\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["BiometryType","AuthenticationStrength","BiometricAuthError","registerPlugin","WebPlugin"],"mappings":";;;;AAAWA;AACX,CAAC,UAAU,YAAY,EAAE;AACzB;AACA,IAAI,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM;AACnD;AACA,IAAI,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU;AAC3D;AACA,IAAI,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS;AACzD;AACA,IAAI,YAAY,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa;AACjE;AACA,IAAI,YAAY,CAAC,YAAY,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,qBAAqB;AACjF;AACA,IAAI,YAAY,CAAC,YAAY,CAA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,EAAE,QAAQ,CAAC;AACnD;AACA,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAClD,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var BiometryType;\n(function (BiometryType) {\n // Android, iOS\n BiometryType[BiometryType[\"NONE\"] = 0] = \"NONE\";\n // iOS\n BiometryType[BiometryType[\"TOUCH_ID\"] = 1] = \"TOUCH_ID\";\n // iOS\n BiometryType[BiometryType[\"FACE_ID\"] = 2] = \"FACE_ID\";\n // Android\n BiometryType[BiometryType[\"FINGERPRINT\"] = 3] = \"FINGERPRINT\";\n // Android\n BiometryType[BiometryType[\"FACE_AUTHENTICATION\"] = 4] = \"FACE_AUTHENTICATION\";\n // Android\n BiometryType[BiometryType[\"IRIS_AUTHENTICATION\"] = 5] = \"IRIS_AUTHENTICATION\";\n // Android\n BiometryType[BiometryType[\"MULTIPLE\"] = 6] = \"MULTIPLE\";\n // Android - Device credentials (PIN, pattern, or password)\n BiometryType[BiometryType[\"DEVICE_CREDENTIAL\"] = 7] = \"DEVICE_CREDENTIAL\";\n})(BiometryType || (BiometryType = {}));\nexport var AuthenticationStrength;\n(function (AuthenticationStrength) {\n /**\n * No authentication available, even if PIN is available but useFallback = false\n */\n AuthenticationStrength[AuthenticationStrength[\"NONE\"] = 0] = \"NONE\";\n /**\n * Strong authentication: Face ID on iOS, fingerprints on devices that consider fingerprints strong (Android).\n * Note: PIN/pattern/password is NEVER considered STRONG, even when useFallback = true.\n */\n AuthenticationStrength[AuthenticationStrength[\"STRONG\"] = 1] = \"STRONG\";\n /**\n * Weak authentication: Face authentication on Android devices that consider face weak,\n * or PIN/pattern/password if useFallback = true (PIN is always WEAK, never STRONG).\n */\n AuthenticationStrength[AuthenticationStrength[\"WEAK\"] = 2] = \"WEAK\";\n})(AuthenticationStrength || (AuthenticationStrength = {}));\n/**\n * Biometric authentication error codes.\n * These error codes are used in both isAvailable() and verifyIdentity() methods.\n *\n * Keep this in sync with BiometricAuthError in README.md\n * Update whenever `convertToPluginErrorCode` functions are modified\n */\nexport var BiometricAuthError;\n(function (BiometricAuthError) {\n /**\n * Unknown error occurred\n */\n BiometricAuthError[BiometricAuthError[\"UNKNOWN_ERROR\"] = 0] = \"UNKNOWN_ERROR\";\n /**\n * Biometrics are unavailable (no hardware or hardware error)\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"BIOMETRICS_UNAVAILABLE\"] = 1] = \"BIOMETRICS_UNAVAILABLE\";\n /**\n * User has been locked out due to too many failed attempts\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"USER_LOCKOUT\"] = 2] = \"USER_LOCKOUT\";\n /**\n * No biometrics are enrolled on the device\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"BIOMETRICS_NOT_ENROLLED\"] = 3] = \"BIOMETRICS_NOT_ENROLLED\";\n /**\n * User is temporarily locked out (Android: 30 second lockout)\n * Platform: Android\n */\n BiometricAuthError[BiometricAuthError[\"USER_TEMPORARY_LOCKOUT\"] = 4] = \"USER_TEMPORARY_LOCKOUT\";\n /**\n * Authentication failed (user did not authenticate successfully)\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"AUTHENTICATION_FAILED\"] = 10] = \"AUTHENTICATION_FAILED\";\n /**\n * App canceled the authentication (iOS only)\n * Platform: iOS\n */\n BiometricAuthError[BiometricAuthError[\"APP_CANCEL\"] = 11] = \"APP_CANCEL\";\n /**\n * Invalid context (iOS only)\n * Platform: iOS\n */\n BiometricAuthError[BiometricAuthError[\"INVALID_CONTEXT\"] = 12] = \"INVALID_CONTEXT\";\n /**\n * Authentication was not interactive (iOS only)\n * Platform: iOS\n */\n BiometricAuthError[BiometricAuthError[\"NOT_INTERACTIVE\"] = 13] = \"NOT_INTERACTIVE\";\n /**\n * Passcode/PIN is not set on the device\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"PASSCODE_NOT_SET\"] = 14] = \"PASSCODE_NOT_SET\";\n /**\n * System canceled the authentication (e.g., due to screen lock)\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"SYSTEM_CANCEL\"] = 15] = \"SYSTEM_CANCEL\";\n /**\n * User canceled the authentication\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"USER_CANCEL\"] = 16] = \"USER_CANCEL\";\n /**\n * User chose to use fallback authentication method\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"USER_FALLBACK\"] = 17] = \"USER_FALLBACK\";\n})(BiometricAuthError || (BiometricAuthError = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst NativeBiometric = registerPlugin('NativeBiometric', {\n web: () => import('./web').then((m) => new m.NativeBiometricWeb()),\n});\nexport * from './definitions';\nexport { NativeBiometric };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { BiometryType, AuthenticationStrength } from './definitions';\nexport class NativeBiometricWeb extends WebPlugin {\n constructor() {\n super();\n /**\n * In-memory credential storage for browser development/testing.\n * Credentials are stored temporarily and cleared on page refresh.\n * This is NOT secure storage and should only be used for development purposes.\n */\n this.credentialStore = new Map();\n }\n isAvailable() {\n // Web platform: return a dummy implementation for development/testing\n // Using TOUCH_ID as a generic placeholder for simulated biometric authentication\n return Promise.resolve({\n isAvailable: true,\n authenticationStrength: AuthenticationStrength.STRONG,\n biometryType: BiometryType.TOUCH_ID,\n deviceIsSecure: true,\n strongBiometryIsAvailable: true,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async addListener(_eventName, _listener) {\n // Web platform: no-op, but return a valid handle\n return {\n remove: async () => {\n // Nothing to remove on web\n },\n };\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n verifyIdentity(_options) {\n console.log('verifyIdentity (dummy implementation)');\n // Dummy implementation: always succeeds for browser testing\n return Promise.resolve();\n }\n getCredentials(_options) {\n console.log('getCredentials (dummy implementation)', { server: _options.server });\n // Dummy implementation: retrieve from in-memory store\n const credentials = this.credentialStore.get(_options.server);\n if (!credentials) {\n throw new Error('No credentials found for the specified server');\n }\n return Promise.resolve(credentials);\n }\n setCredentials(_options) {\n console.log('setCredentials (dummy implementation)', { server: _options.server });\n // Dummy implementation: store in memory\n this.credentialStore.set(_options.server, {\n username: _options.username,\n password: _options.password,\n });\n return Promise.resolve();\n }\n deleteCredentials(_options) {\n console.log('deleteCredentials (dummy implementation)', { server: _options.server });\n // Dummy implementation: remove from in-memory store\n this.credentialStore.delete(_options.server);\n return Promise.resolve();\n }\n isCredentialsSaved(_options) {\n console.log('isCredentialsSaved (dummy implementation)', { server: _options.server });\n // Dummy implementation: check in-memory store\n return Promise.resolve({ isSaved: this.credentialStore.has(_options.server) });\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["BiometryType","AuthenticationStrength","BiometricAuthError","registerPlugin","WebPlugin"],"mappings":";;;;AAAWA;AACX,CAAC,UAAU,YAAY,EAAE;AACzB;AACA,IAAI,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM;AACnD;AACA,IAAI,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU;AAC3D;AACA,IAAI,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS;AACzD;AACA,IAAI,YAAY,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa;AACjE;AACA,IAAI,YAAY,CAAC,YAAY,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,qBAAqB;AACjF;A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C,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;AACzF;AACA,QAAQ,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE;AAClD,YAAY,QAAQ,EAAE,QAAQ,CAAC,QAAQ;AACvC,YAAY,QAAQ,EAAE,QAAQ,CAAC,QAAQ;AACvC,SAAS,CAAC;AACV,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE;AAChC,IAAI;AACJ,IAAI,iBAAiB,CAAC,QAAQ,EAAE;AAChC,QAAQ,OAAO,CAAC,GAAG,CAAC,0CAA0C,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;AAC5F;AACA,QAAQ,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;AACpD,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE;AAChC,IAAI;AACJ,IAAI,kBAAkB,CAAC,QAAQ,EAAE;AACjC,QAAQ,OAAO,CAAC,GAAG,CAAC,2CAA2C,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;AAC7F;AACA,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;AACtF,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -119,15 +119,22 @@ var capacitorCapacitorBiometric = (function (exports, core) {
119
119
  class NativeBiometricWeb extends core.WebPlugin {
120
120
  constructor() {
121
121
  super();
122
+ /**
123
+ * In-memory credential storage for browser development/testing.
124
+ * Credentials are stored temporarily and cleared on page refresh.
125
+ * This is NOT secure storage and should only be used for development purposes.
126
+ */
127
+ this.credentialStore = new Map();
122
128
  }
123
129
  isAvailable() {
124
- // Web platform: biometrics not available, but return structured response
130
+ // Web platform: return a dummy implementation for development/testing
131
+ // Using TOUCH_ID as a generic placeholder for simulated biometric authentication
125
132
  return Promise.resolve({
126
- isAvailable: false,
127
- authenticationStrength: exports.AuthenticationStrength.NONE,
128
- biometryType: exports.BiometryType.NONE,
129
- deviceIsSecure: false,
130
- strongBiometryIsAvailable: false,
133
+ isAvailable: true,
134
+ authenticationStrength: exports.AuthenticationStrength.STRONG,
135
+ biometryType: exports.BiometryType.TOUCH_ID,
136
+ deviceIsSecure: true,
137
+ strongBiometryIsAvailable: true,
131
138
  });
132
139
  }
133
140
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -139,26 +146,40 @@ var capacitorCapacitorBiometric = (function (exports, core) {
139
146
  },
140
147
  };
141
148
  }
149
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
142
150
  verifyIdentity(_options) {
143
- console.log('verifyIdentity', _options);
144
- throw new Error('Biometric authentication is not available on web platform.');
151
+ console.log('verifyIdentity (dummy implementation)');
152
+ // Dummy implementation: always succeeds for browser testing
153
+ return Promise.resolve();
145
154
  }
146
155
  getCredentials(_options) {
147
- console.log('getCredentials', _options);
148
- throw new Error('Credential storage is not available on web platform.');
156
+ console.log('getCredentials (dummy implementation)', { server: _options.server });
157
+ // Dummy implementation: retrieve from in-memory store
158
+ const credentials = this.credentialStore.get(_options.server);
159
+ if (!credentials) {
160
+ throw new Error('No credentials found for the specified server');
161
+ }
162
+ return Promise.resolve(credentials);
149
163
  }
150
164
  setCredentials(_options) {
151
- console.log('setCredentials', _options);
152
- throw new Error('Credential storage is not available on web platform.');
165
+ console.log('setCredentials (dummy implementation)', { server: _options.server });
166
+ // Dummy implementation: store in memory
167
+ this.credentialStore.set(_options.server, {
168
+ username: _options.username,
169
+ password: _options.password,
170
+ });
171
+ return Promise.resolve();
153
172
  }
154
173
  deleteCredentials(_options) {
155
- console.log('deleteCredentials', _options);
156
- throw new Error('Credential storage is not available on web platform.');
174
+ console.log('deleteCredentials (dummy implementation)', { server: _options.server });
175
+ // Dummy implementation: remove from in-memory store
176
+ this.credentialStore.delete(_options.server);
177
+ return Promise.resolve();
157
178
  }
158
179
  isCredentialsSaved(_options) {
159
- console.log('isCredentialsSaved', _options);
160
- // Return false on web - no credentials can be saved
161
- return Promise.resolve({ isSaved: false });
180
+ console.log('isCredentialsSaved (dummy implementation)', { server: _options.server });
181
+ // Dummy implementation: check in-memory store
182
+ return Promise.resolve({ isSaved: this.credentialStore.has(_options.server) });
162
183
  }
163
184
  async getPluginVersion() {
164
185
  return { version: 'web' };
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var BiometryType;\n(function (BiometryType) {\n // Android, iOS\n BiometryType[BiometryType[\"NONE\"] = 0] = \"NONE\";\n // iOS\n BiometryType[BiometryType[\"TOUCH_ID\"] = 1] = \"TOUCH_ID\";\n // iOS\n BiometryType[BiometryType[\"FACE_ID\"] = 2] = \"FACE_ID\";\n // Android\n BiometryType[BiometryType[\"FINGERPRINT\"] = 3] = \"FINGERPRINT\";\n // Android\n BiometryType[BiometryType[\"FACE_AUTHENTICATION\"] = 4] = \"FACE_AUTHENTICATION\";\n // Android\n BiometryType[BiometryType[\"IRIS_AUTHENTICATION\"] = 5] = \"IRIS_AUTHENTICATION\";\n // Android\n BiometryType[BiometryType[\"MULTIPLE\"] = 6] = \"MULTIPLE\";\n // Android - Device credentials (PIN, pattern, or password)\n BiometryType[BiometryType[\"DEVICE_CREDENTIAL\"] = 7] = \"DEVICE_CREDENTIAL\";\n})(BiometryType || (BiometryType = {}));\nexport var AuthenticationStrength;\n(function (AuthenticationStrength) {\n /**\n * No authentication available, even if PIN is available but useFallback = false\n */\n AuthenticationStrength[AuthenticationStrength[\"NONE\"] = 0] = \"NONE\";\n /**\n * Strong authentication: Face ID on iOS, fingerprints on devices that consider fingerprints strong (Android).\n * Note: PIN/pattern/password is NEVER considered STRONG, even when useFallback = true.\n */\n AuthenticationStrength[AuthenticationStrength[\"STRONG\"] = 1] = \"STRONG\";\n /**\n * Weak authentication: Face authentication on Android devices that consider face weak,\n * or PIN/pattern/password if useFallback = true (PIN is always WEAK, never STRONG).\n */\n AuthenticationStrength[AuthenticationStrength[\"WEAK\"] = 2] = \"WEAK\";\n})(AuthenticationStrength || (AuthenticationStrength = {}));\n/**\n * Biometric authentication error codes.\n * These error codes are used in both isAvailable() and verifyIdentity() methods.\n *\n * Keep this in sync with BiometricAuthError in README.md\n * Update whenever `convertToPluginErrorCode` functions are modified\n */\nexport var BiometricAuthError;\n(function (BiometricAuthError) {\n /**\n * Unknown error occurred\n */\n BiometricAuthError[BiometricAuthError[\"UNKNOWN_ERROR\"] = 0] = \"UNKNOWN_ERROR\";\n /**\n * Biometrics are unavailable (no hardware or hardware error)\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"BIOMETRICS_UNAVAILABLE\"] = 1] = \"BIOMETRICS_UNAVAILABLE\";\n /**\n * User has been locked out due to too many failed attempts\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"USER_LOCKOUT\"] = 2] = \"USER_LOCKOUT\";\n /**\n * No biometrics are enrolled on the device\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"BIOMETRICS_NOT_ENROLLED\"] = 3] = \"BIOMETRICS_NOT_ENROLLED\";\n /**\n * User is temporarily locked out (Android: 30 second lockout)\n * Platform: Android\n */\n BiometricAuthError[BiometricAuthError[\"USER_TEMPORARY_LOCKOUT\"] = 4] = \"USER_TEMPORARY_LOCKOUT\";\n /**\n * Authentication failed (user did not authenticate successfully)\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"AUTHENTICATION_FAILED\"] = 10] = \"AUTHENTICATION_FAILED\";\n /**\n * App canceled the authentication (iOS only)\n * Platform: iOS\n */\n BiometricAuthError[BiometricAuthError[\"APP_CANCEL\"] = 11] = \"APP_CANCEL\";\n /**\n * Invalid context (iOS only)\n * Platform: iOS\n */\n BiometricAuthError[BiometricAuthError[\"INVALID_CONTEXT\"] = 12] = \"INVALID_CONTEXT\";\n /**\n * Authentication was not interactive (iOS only)\n * Platform: iOS\n */\n BiometricAuthError[BiometricAuthError[\"NOT_INTERACTIVE\"] = 13] = \"NOT_INTERACTIVE\";\n /**\n * Passcode/PIN is not set on the device\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"PASSCODE_NOT_SET\"] = 14] = \"PASSCODE_NOT_SET\";\n /**\n * System canceled the authentication (e.g., due to screen lock)\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"SYSTEM_CANCEL\"] = 15] = \"SYSTEM_CANCEL\";\n /**\n * User canceled the authentication\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"USER_CANCEL\"] = 16] = \"USER_CANCEL\";\n /**\n * User chose to use fallback authentication method\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"USER_FALLBACK\"] = 17] = \"USER_FALLBACK\";\n})(BiometricAuthError || (BiometricAuthError = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst NativeBiometric = registerPlugin('NativeBiometric', {\n web: () => import('./web').then((m) => new m.NativeBiometricWeb()),\n});\nexport * from './definitions';\nexport { NativeBiometric };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { BiometryType, AuthenticationStrength } from './definitions';\nexport class NativeBiometricWeb extends WebPlugin {\n constructor() {\n super();\n }\n isAvailable() {\n // Web platform: biometrics not available, but return structured response\n return Promise.resolve({\n isAvailable: false,\n authenticationStrength: AuthenticationStrength.NONE,\n biometryType: BiometryType.NONE,\n deviceIsSecure: false,\n strongBiometryIsAvailable: false,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async addListener(_eventName, _listener) {\n // Web platform: no-op, but return a valid handle\n return {\n remove: async () => {\n // Nothing to remove on web\n },\n };\n }\n verifyIdentity(_options) {\n console.log('verifyIdentity', _options);\n throw new Error('Biometric authentication is not available on web platform.');\n }\n getCredentials(_options) {\n console.log('getCredentials', _options);\n throw new Error('Credential storage is not available on web platform.');\n }\n setCredentials(_options) {\n console.log('setCredentials', _options);\n throw new Error('Credential storage is not available on web platform.');\n }\n deleteCredentials(_options) {\n console.log('deleteCredentials', _options);\n throw new Error('Credential storage is not available on web platform.');\n }\n isCredentialsSaved(_options) {\n console.log('isCredentialsSaved', _options);\n // Return false on web - no credentials can be saved\n return Promise.resolve({ isSaved: false });\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["BiometryType","AuthenticationStrength","BiometricAuthError","registerPlugin","WebPlugin"],"mappings":";;;AAAWA;IACX,CAAC,UAAU,YAAY,EAAE;IACzB;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM;IACnD;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU;IAC3D;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS;IACzD;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa;IACjE;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,qBAAqB;IACjF;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,qBAAqB;IACjF;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU;IAC3D;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,GAAG,mBAAmB;IAC7E,CAAC,EAAEA,oBAAY,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,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var BiometryType;\n(function (BiometryType) {\n // Android, iOS\n BiometryType[BiometryType[\"NONE\"] = 0] = \"NONE\";\n // iOS\n BiometryType[BiometryType[\"TOUCH_ID\"] = 1] = \"TOUCH_ID\";\n // iOS\n BiometryType[BiometryType[\"FACE_ID\"] = 2] = \"FACE_ID\";\n // Android\n BiometryType[BiometryType[\"FINGERPRINT\"] = 3] = \"FINGERPRINT\";\n // Android\n BiometryType[BiometryType[\"FACE_AUTHENTICATION\"] = 4] = \"FACE_AUTHENTICATION\";\n // Android\n BiometryType[BiometryType[\"IRIS_AUTHENTICATION\"] = 5] = \"IRIS_AUTHENTICATION\";\n // Android\n BiometryType[BiometryType[\"MULTIPLE\"] = 6] = \"MULTIPLE\";\n // Android - Device credentials (PIN, pattern, or password)\n BiometryType[BiometryType[\"DEVICE_CREDENTIAL\"] = 7] = \"DEVICE_CREDENTIAL\";\n})(BiometryType || (BiometryType = {}));\nexport var AuthenticationStrength;\n(function (AuthenticationStrength) {\n /**\n * No authentication available, even if PIN is available but useFallback = false\n */\n AuthenticationStrength[AuthenticationStrength[\"NONE\"] = 0] = \"NONE\";\n /**\n * Strong authentication: Face ID on iOS, fingerprints on devices that consider fingerprints strong (Android).\n * Note: PIN/pattern/password is NEVER considered STRONG, even when useFallback = true.\n */\n AuthenticationStrength[AuthenticationStrength[\"STRONG\"] = 1] = \"STRONG\";\n /**\n * Weak authentication: Face authentication on Android devices that consider face weak,\n * or PIN/pattern/password if useFallback = true (PIN is always WEAK, never STRONG).\n */\n AuthenticationStrength[AuthenticationStrength[\"WEAK\"] = 2] = \"WEAK\";\n})(AuthenticationStrength || (AuthenticationStrength = {}));\n/**\n * Biometric authentication error codes.\n * These error codes are used in both isAvailable() and verifyIdentity() methods.\n *\n * Keep this in sync with BiometricAuthError in README.md\n * Update whenever `convertToPluginErrorCode` functions are modified\n */\nexport var BiometricAuthError;\n(function (BiometricAuthError) {\n /**\n * Unknown error occurred\n */\n BiometricAuthError[BiometricAuthError[\"UNKNOWN_ERROR\"] = 0] = \"UNKNOWN_ERROR\";\n /**\n * Biometrics are unavailable (no hardware or hardware error)\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"BIOMETRICS_UNAVAILABLE\"] = 1] = \"BIOMETRICS_UNAVAILABLE\";\n /**\n * User has been locked out due to too many failed attempts\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"USER_LOCKOUT\"] = 2] = \"USER_LOCKOUT\";\n /**\n * No biometrics are enrolled on the device\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"BIOMETRICS_NOT_ENROLLED\"] = 3] = \"BIOMETRICS_NOT_ENROLLED\";\n /**\n * User is temporarily locked out (Android: 30 second lockout)\n * Platform: Android\n */\n BiometricAuthError[BiometricAuthError[\"USER_TEMPORARY_LOCKOUT\"] = 4] = \"USER_TEMPORARY_LOCKOUT\";\n /**\n * Authentication failed (user did not authenticate successfully)\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"AUTHENTICATION_FAILED\"] = 10] = \"AUTHENTICATION_FAILED\";\n /**\n * App canceled the authentication (iOS only)\n * Platform: iOS\n */\n BiometricAuthError[BiometricAuthError[\"APP_CANCEL\"] = 11] = \"APP_CANCEL\";\n /**\n * Invalid context (iOS only)\n * Platform: iOS\n */\n BiometricAuthError[BiometricAuthError[\"INVALID_CONTEXT\"] = 12] = \"INVALID_CONTEXT\";\n /**\n * Authentication was not interactive (iOS only)\n * Platform: iOS\n */\n BiometricAuthError[BiometricAuthError[\"NOT_INTERACTIVE\"] = 13] = \"NOT_INTERACTIVE\";\n /**\n * Passcode/PIN is not set on the device\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"PASSCODE_NOT_SET\"] = 14] = \"PASSCODE_NOT_SET\";\n /**\n * System canceled the authentication (e.g., due to screen lock)\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"SYSTEM_CANCEL\"] = 15] = \"SYSTEM_CANCEL\";\n /**\n * User canceled the authentication\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"USER_CANCEL\"] = 16] = \"USER_CANCEL\";\n /**\n * User chose to use fallback authentication method\n * Platform: Android, iOS\n */\n BiometricAuthError[BiometricAuthError[\"USER_FALLBACK\"] = 17] = \"USER_FALLBACK\";\n})(BiometricAuthError || (BiometricAuthError = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst NativeBiometric = registerPlugin('NativeBiometric', {\n web: () => import('./web').then((m) => new m.NativeBiometricWeb()),\n});\nexport * from './definitions';\nexport { NativeBiometric };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { BiometryType, AuthenticationStrength } from './definitions';\nexport class NativeBiometricWeb extends WebPlugin {\n constructor() {\n super();\n /**\n * In-memory credential storage for browser development/testing.\n * Credentials are stored temporarily and cleared on page refresh.\n * This is NOT secure storage and should only be used for development purposes.\n */\n this.credentialStore = new Map();\n }\n isAvailable() {\n // Web platform: return a dummy implementation for development/testing\n // Using TOUCH_ID as a generic placeholder for simulated biometric authentication\n return Promise.resolve({\n isAvailable: true,\n authenticationStrength: AuthenticationStrength.STRONG,\n biometryType: BiometryType.TOUCH_ID,\n deviceIsSecure: true,\n strongBiometryIsAvailable: true,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async addListener(_eventName, _listener) {\n // Web platform: no-op, but return a valid handle\n return {\n remove: async () => {\n // Nothing to remove on web\n },\n };\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n verifyIdentity(_options) {\n console.log('verifyIdentity (dummy implementation)');\n // Dummy implementation: always succeeds for browser testing\n return Promise.resolve();\n }\n getCredentials(_options) {\n console.log('getCredentials (dummy implementation)', { server: _options.server });\n // Dummy implementation: retrieve from in-memory store\n const credentials = this.credentialStore.get(_options.server);\n if (!credentials) {\n throw new Error('No credentials found for the specified server');\n }\n return Promise.resolve(credentials);\n }\n setCredentials(_options) {\n console.log('setCredentials (dummy implementation)', { server: _options.server });\n // Dummy implementation: store in memory\n this.credentialStore.set(_options.server, {\n username: _options.username,\n password: _options.password,\n });\n return Promise.resolve();\n }\n deleteCredentials(_options) {\n console.log('deleteCredentials (dummy implementation)', { server: _options.server });\n // Dummy implementation: remove from in-memory store\n this.credentialStore.delete(_options.server);\n return Promise.resolve();\n }\n isCredentialsSaved(_options) {\n console.log('isCredentialsSaved (dummy implementation)', { server: _options.server });\n // Dummy implementation: check in-memory store\n return Promise.resolve({ isSaved: this.credentialStore.has(_options.server) });\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["BiometryType","AuthenticationStrength","BiometricAuthError","registerPlugin","WebPlugin"],"mappings":";;;AAAWA;IACX,CAAC,UAAU,YAAY,EAAE;IACzB;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM;IACnD;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU;IAC3D;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS;IACzD;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa;IACjE;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,qBAAqB;IACjF;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,qBAAqB;IACjF;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU;IAC3D;IACA,IAAI,YAAY,CAAC,YAAY,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,GAAG,mBA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ACV,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE;IAChC,IAAI;IACJ,IAAI,iBAAiB,CAAC,QAAQ,EAAE;IAChC,QAAQ,OAAO,CAAC,GAAG,CAAC,0CAA0C,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC5F;IACA,QAAQ,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;IACpD,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE;IAChC,IAAI;IACJ,IAAI,kBAAkB,CAAC,QAAQ,EAAE;IACjC,QAAQ,OAAO,CAAC,GAAG,CAAC,2CAA2C,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC7F;IACA,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;IACtF,IAAI;IACJ,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;IACjC,IAAI;IACJ;;;;;;;;;;;;;;;"}
@@ -11,7 +11,7 @@ import LocalAuthentication
11
11
 
12
12
  @objc(NativeBiometricPlugin)
13
13
  public class NativeBiometricPlugin: CAPPlugin, CAPBridgedPlugin {
14
- private let pluginVersion: String = "8.1.0"
14
+ private let pluginVersion: String = "8.3.0"
15
15
  public let identifier = "NativeBiometricPlugin"
16
16
  public let jsName = "NativeBiometric"
17
17
  public let pluginMethods: [CAPPluginMethod] = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-native-biometric",
3
- "version": "8.1.0",
3
+ "version": "8.3.0",
4
4
  "description": "This plugin gives access to the native biometric apis for android and iOS",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",