@aparajita/capacitor-biometric-auth 3.1.3 → 3.1.4

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
@@ -28,6 +28,8 @@ Not using [pnpm](https://pnpm.js.org/)? You owe it to yourself to give it a try.
28
28
 
29
29
  The API is extensively documented in the [TypeScript definitions file](src/definitions.ts). There is also (somewhat incomplete auto-generated) documentation [below](#api). For a complete example of how to use this plugin in practice, see the [demo app](https://github.com/aparajita/capacitor-biometric-auth-demo).
30
30
 
31
+ > **NOTE:** Your Android app must use a base theme named "AppTheme".
32
+
31
33
  ### Checking availability
32
34
 
33
35
  Before giving the user the option to use biometry (such as displaying a biometry icon), call [`checkBiometry`](#checkbiometry) and inspect the [`CheckBiometryResult`](#checkbiometryresult) to see what (if any) biometry is available on the device. Note that `isAvailable` may be `false` but `biometryType` may indicate the presence of biometry on the device. This occurs if the current user is not enrolled in biometry, or if biometry has been disabled for the current app. In such cases the `reason` will tell you why.
@@ -107,7 +109,7 @@ web only<br><br>On the web, this method allows you to dynamically simulate diffe
107
109
  authenticate(options?: AuthenticateOptions) => Promise<void>
108
110
  ```
109
111
 
110
- Prompt the user for authentication. If authorization fails for any reason, the promise is rejected with a `BiometryError`.<br><br>For detailed information about the behavior on iOS, see:<br><br>https://developer.apple.com/documentation/localauthentication/lapolicy/deviceownerauthenticationwithbiometrics<br><br>Android imposes a limit of 5 failed attempts. If `allowDeviceCredential` is `true`, the user will then be presented with a device credential prompt. If `allowDeviceCredential` is `false`, `authenticate()` will reject with a `BiometryErrorType` of `biometryLockout`, after which the user will have to wait 30 seconds before being allowed to authenticate again.
112
+ Prompt the user for authentication. If authorization fails for any reason, the promise is rejected with a `BiometryError`.<br><br>For detailed information about the behavior on iOS, see:<br><br>https://developer.apple.com/documentation/localauthentication/lapolicy/deviceownerauthenticationwithbiometrics<br><br>Some versions of Android impose a limit on the number of failed attempts. If `allowDeviceCredential` is `true`, when the limit is reached the user will then be presented with a device credential prompt. If `allowDeviceCredential` is `false`, when the limit is reached `authenticate()` will reject with a `BiometryErrorType` of `biometryLockout`, after which the user will have to wait the system-defined length of time before being allowed to authenticate again.
111
113
 
112
114
  | Param | Type |
113
115
  | :------ | :----------------------------------------------------- |
@@ -5,7 +5,7 @@
5
5
  <application>
6
6
  <activity
7
7
  android:name=".AuthActivity"
8
- android:label="@string/title_activity_auth_acitivy"
8
+ android:label="@string/title_activity_auth_activity"
9
9
  android:theme="@style/AppTheme.Transparent"/>
10
10
  </application>
11
11
 
@@ -1,12 +1,3 @@
1
1
  <resources>
2
- <string name="my_string">Just a simple string</string>
3
- <string name="title_activity_auth_acitivy">AuthAcitivy</string>
4
- <!-- Strings used for fragments for navigation -->
5
- <string name="first_fragment_label">First Fragment</string>
6
- <string name="second_fragment_label">Second Fragment</string>
7
- <string name="next">Next</string>
8
- <string name="previous">Previous</string>
9
-
10
- <string name="hello_first_fragment">Hello first fragment</string>
11
- <string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string>
2
+ <string name="title_activity_auth_activity">AuthActivity</string>
12
3
  </resources>
@@ -1,11 +1,5 @@
1
1
  <resources>
2
2
 
3
-
4
- <style name="AppTheme.NoActionBar">
5
- <item name="windowActionBar">false</item>
6
- <item name="windowNoTitle">true</item>
7
- </style>
8
-
9
3
  <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
10
4
 
11
5
  <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
@@ -173,11 +173,13 @@ export interface BiometricAuthPlugin extends WebPlugin {
173
173
  *
174
174
  * https://developer.apple.com/documentation/localauthentication/lapolicy/deviceownerauthenticationwithbiometrics
175
175
  *
176
- * Android imposes a limit of 5 failed attempts. If `allowDeviceCredential` is
177
- * `true`, the user will then be presented with a device credential prompt.
178
- * If `allowDeviceCredential` is `false`, `authenticate()` will reject with
179
- * a `BiometryErrorType` of `biometryLockout`, after which the user will have
180
- * to wait 30 seconds before being allowed to authenticate again.
176
+ * Some versions of Android impose a limit on the number of failed attempts.
177
+ * If `allowDeviceCredential` is `true`, when the limit is reached
178
+ * the user will then be presented with a device credential prompt.
179
+ * If `allowDeviceCredential` is `false`, when the limit is reached
180
+ * `authenticate()` will reject with a `BiometryErrorType` of `biometryLockout`,
181
+ * after which the user will have to wait the system-defined length of time
182
+ * before being allowed to authenticate again.
181
183
  *
182
184
  * @rejects {BiometryError}
183
185
  */
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@aparajita/capacitor-biometric-auth",
3
- "version": "3.1.3"
3
+ "version": "3.1.4"
4
4
  }
@@ -7,7 +7,7 @@ var app = require('@capacitor/app');
7
7
 
8
8
  var info = {
9
9
  name: "@aparajita/capacitor-biometric-auth",
10
- version: "3.1.3"
10
+ version: "3.1.4"
11
11
  };
12
12
 
13
13
  exports.BiometryType = void 0;
package/dist/plugin.js CHANGED
@@ -3,7 +3,7 @@ var capacitorBiometricAuth = (function (exports, core, app) {
3
3
 
4
4
  var info = {
5
5
  name: "@aparajita/capacitor-biometric-auth",
6
- version: "3.1.3"
6
+ version: "3.1.4"
7
7
  };
8
8
 
9
9
  exports.BiometryType = void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aparajita/capacitor-biometric-auth",
3
- "version": "3.1.3",
3
+ "version": "3.1.4",
4
4
  "description": "Provides access to the native biometric auth APIs for Capacitor apps",
5
5
  "author": "Aparajita Fishman",
6
6
  "license": "MIT",
@@ -1,15 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
- xmlns:app="http://schemas.android.com/apk/res-auto"
4
- xmlns:tools="http://schemas.android.com/tools"
5
- android:layout_width="match_parent"
6
- android:layout_height="match_parent"
7
- tools:context="com.getcapacitor.BridgeActivity"
8
- >
9
-
10
- <WebView
11
- android:id="@+id/webview"
12
- android:layout_width="fill_parent"
13
- android:layout_height="fill_parent" />
14
-
15
- </androidx.coordinatorlayout.widget.CoordinatorLayout>
@@ -1,28 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <navigation xmlns:android="http://schemas.android.com/apk/res/android"
3
- xmlns:app="http://schemas.android.com/apk/res-auto"
4
- xmlns:tools="http://schemas.android.com/tools"
5
- android:id="@+id/nav_graph"
6
- app:startDestination="@id/FirstFragment">
7
-
8
- <fragment
9
- android:id="@+id/FirstFragment"
10
- android:name="com.epicshaggy.biometric.FirstFragment"
11
- android:label="@string/first_fragment_label"
12
- tools:layout="@layout/fragment_first">
13
-
14
- <action
15
- android:id="@+id/action_FirstFragment_to_SecondFragment"
16
- app:destination="@id/SecondFragment" />
17
- </fragment>
18
- <fragment
19
- android:id="@+id/SecondFragment"
20
- android:name="com.epicshaggy.biometric.SecondFragment"
21
- android:label="@string/second_fragment_label"
22
- tools:layout="@layout/fragment_second">
23
-
24
- <action
25
- android:id="@+id/action_SecondFragment_to_FirstFragment"
26
- app:destination="@id/FirstFragment" />
27
- </fragment>
28
- </navigation>
@@ -1,3 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <resources>
3
- </resources>
@@ -1,3 +0,0 @@
1
- <resources>
2
- <dimen name="fab_margin">16dp</dimen>
3
- </resources>