@aparajita/capacitor-biometric-auth 5.0.1 → 5.1.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 +8 -7
- package/android/src/main/AndroidManifest.xml +1 -2
- package/android/src/main/java/com/aparajita/capacitor/biometricauth/AuthActivity.java +7 -5
- package/android/src/main/java/com/aparajita/capacitor/biometricauth/BiometricAuthNative.java +39 -14
- package/android/src/main/java/com/aparajita/capacitor/biometricauth/BiometryResultType.java +1 -1
- package/dist/esm/definitions.d.ts +13 -3
- package/dist/esm/native.js +1 -0
- package/dist/esm/web.js +3 -2
- package/dist/plugin.cjs.js +4 -2
- package/dist/plugin.js +4 -2
- package/ios/Plugin/Plugin.swift +6 -1
- package/package.json +26 -27
package/README.md
CHANGED
|
@@ -137,12 +137,13 @@ Register a function that will be called when the app resumes. The function will
|
|
|
137
137
|
|
|
138
138
|
#### CheckBiometryResult
|
|
139
139
|
|
|
140
|
-
| Prop
|
|
141
|
-
|
|
|
142
|
-
| isAvailable
|
|
143
|
-
| biometryType
|
|
144
|
-
|
|
|
145
|
-
|
|
|
140
|
+
| Prop | Type | Description |
|
|
141
|
+
| :------------ | :------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
142
|
+
| isAvailable | boolean | True if the device has biometric authentication capability and the current user has enrolled in some form of biometry. |
|
|
143
|
+
| biometryType | <a href="#biometrytype">BiometryType</a> | The primary type of biometry available on the device. If the device supports both fingerprint and face authentication, this will be <a href="#biometrytype">`BiometryType.touchId`</a>. |
|
|
144
|
+
| biometryTypes | BiometryType[] | All of the biometry types supported by the device (currently only Android devices support multiple biometry types). If no biometry is available, this will be an empty array. If multiple types are supported, Android only guarantees that one of them is actually available. |
|
|
145
|
+
| reason | string | If biometry is not available and the system gives a reason why, it will be returned here. Otherwise it's an empty string. |
|
|
146
|
+
| code | <a href="#biometryerrortype">BiometryErrorType</a> | If biometry is not available, the error code will be returned here. Otherwise it's an empty string. The error code will be one of the <a href="#biometryerrortype">`BiometryErrorType`</a> enum values, and is consistent across platforms. This allows you to check for specific errors in a platform- independent way, for example:<br><br>if (result.code === <a href="#biometryerrortype">BiometryErrorType.biometryNotEnrolled</a>) { ... } |
|
|
146
147
|
|
|
147
148
|
#### AuthenticateOptions
|
|
148
149
|
|
|
@@ -151,7 +152,7 @@ Register a function that will be called when the app resumes. The function will
|
|
|
151
152
|
| reason | string | The reason for requesting authentication. Displays in the authentication dialog presented to the user. If not supplied, a default message is displayed. |
|
|
152
153
|
| cancelTitle | string | iOS: The system presents a cancel button during biometric authentication to let the user abort the authentication attempt. The button appears every time the system asks the user to present a finger registered with Touch ID. For Face ID, the button only appears if authentication fails and the user is prompted to try again. Either way, the user can stop trying to authenticate by tapping the button.<br><br>Android: The text for the negative button. This would typically be used as a "Cancel" button, but may be also used to show an alternative method for authentication, such as a screen that asks for a backup password.<br><br>Default: "Cancel" |
|
|
153
154
|
| allowDeviceCredential | boolean | If true, allows for authentication using device unlock credentials. Default is false.<br><br>iOS: If biometry is available, enrolled, and not disabled, the system uses that first. After the first Touch ID failure or second Face ID failure, if `iosFallbackTitle` is not an empty string, a fallback button appears in the authentication dialog. If the user taps the fallback button, the system prompts the user for the device passcode or the user’s password. If `iosFallbackTitle` is an empty string, no fallback button will appear.<br><br>If biometry is not available, enrolled and enabled, and a passcode is set, the system immediately prompts the user for the device passcode or user’s password. Authentication fails with the error code `passcodeNotSet` if the device passcode isn’t enabled.<br><br>If a passcode is not set on the device, a `passcodeNotSet` error is returned.<br><br>The system disables passcode authentication after 6 unsuccessful attempts, with progressively increasing delays between attempts.<br><br>The title of the fallback button may be customized by setting `iosFallbackTitle` to a non-empty string.<br><br>Android: The user will first be prompted to authenticate with biometrics, but also given the option to authenticate with their device PIN, pattern, or password by tapping a button in the authentication dialog. The title of the button is supplied by the system. |
|
|
154
|
-
| iosFallbackTitle | string | The system presents a fallback button when biometric authentication fails — for example, because the system doesn’t recognize the presented finger, or after several failed attempts to recognize the user’s face.<br><br>If `allowDeviceCredential` is false, tapping this button dismisses the authentication dialog and returns the error code userFallback. If undefined, the localized
|
|
155
|
+
| iosFallbackTitle | string | The system presents a fallback button when biometric authentication fails — for example, because the system doesn’t recognize the presented finger, or after several failed attempts to recognize the user’s face.<br><br>If `allowDeviceCredential` is false, tapping this button dismisses the authentication dialog and returns the error code userFallback. If undefined, the localized system default title is used. Passing an empty string hides the fallback button completely.<br><br>If `allowDeviceCredential` is true and this is undefined, the localized system default title is used. |
|
|
155
156
|
| androidTitle | string | Title for the Android dialog. If not supplied, the system default is used. |
|
|
156
157
|
| androidSubtitle | string | Subtitle for the Android dialog. If not supplied, the system default is used. |
|
|
157
158
|
|
|
@@ -30,7 +30,8 @@ public class AuthActivity extends AppCompatActivity {
|
|
|
30
30
|
executor = command -> new Handler(this.getMainLooper()).post(command);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
BiometricPrompt.PromptInfo.Builder builder =
|
|
33
|
+
BiometricPrompt.PromptInfo.Builder builder =
|
|
34
|
+
new BiometricPrompt.PromptInfo.Builder();
|
|
34
35
|
Intent intent = getIntent();
|
|
35
36
|
String title = intent.getStringExtra(BiometricAuthNative.TITLE);
|
|
36
37
|
String subtitle = intent.getStringExtra(BiometricAuthNative.SUBTITLE);
|
|
@@ -54,9 +55,7 @@ public class AuthActivity extends AppCompatActivity {
|
|
|
54
55
|
title = "Authenticate";
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
builder.setTitle(title)
|
|
58
|
-
.setSubtitle(subtitle)
|
|
59
|
-
.setDescription(description);
|
|
58
|
+
builder.setTitle(title).setSubtitle(subtitle).setDescription(description);
|
|
60
59
|
|
|
61
60
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
|
62
61
|
int authenticators = BiometricManager.Authenticators.BIOMETRIC_WEAK;
|
|
@@ -128,7 +127,10 @@ public class AuthActivity extends AppCompatActivity {
|
|
|
128
127
|
intent
|
|
129
128
|
.putExtra(prefix + BiometricAuthNative.RESULT_TYPE, resultType.toString())
|
|
130
129
|
.putExtra(prefix + BiometricAuthNative.RESULT_ERROR_CODE, errorCode)
|
|
131
|
-
.putExtra(
|
|
130
|
+
.putExtra(
|
|
131
|
+
prefix + BiometricAuthNative.RESULT_ERROR_MESSAGE,
|
|
132
|
+
errorMessage
|
|
133
|
+
);
|
|
132
134
|
|
|
133
135
|
setResult(RESULT_OK, intent);
|
|
134
136
|
finish();
|
package/android/src/main/java/com/aparajita/capacitor/biometricauth/BiometricAuthNative.java
CHANGED
|
@@ -8,12 +8,14 @@ import android.os.Build;
|
|
|
8
8
|
import androidx.activity.result.ActivityResult;
|
|
9
9
|
import androidx.biometric.BiometricManager;
|
|
10
10
|
import androidx.biometric.BiometricPrompt;
|
|
11
|
+
import com.getcapacitor.JSArray;
|
|
11
12
|
import com.getcapacitor.JSObject;
|
|
12
13
|
import com.getcapacitor.Plugin;
|
|
13
14
|
import com.getcapacitor.PluginCall;
|
|
14
15
|
import com.getcapacitor.PluginMethod;
|
|
15
16
|
import com.getcapacitor.annotation.ActivityCallback;
|
|
16
17
|
import com.getcapacitor.annotation.CapacitorPlugin;
|
|
18
|
+
import java.util.ArrayList;
|
|
17
19
|
import java.util.HashMap;
|
|
18
20
|
|
|
19
21
|
@SuppressLint("RestrictedApi")
|
|
@@ -40,6 +42,7 @@ public class BiometricAuthNative extends Plugin {
|
|
|
40
42
|
|
|
41
43
|
static {
|
|
42
44
|
biometryErrorCodeMap = new HashMap<>();
|
|
45
|
+
biometryErrorCodeMap.put(BiometricManager.BIOMETRIC_SUCCESS, "");
|
|
43
46
|
biometryErrorCodeMap.put(BiometricPrompt.ERROR_CANCELED, "systemCancel");
|
|
44
47
|
biometryErrorCodeMap.put(
|
|
45
48
|
BiometricPrompt.ERROR_HW_NOT_PRESENT,
|
|
@@ -84,7 +87,7 @@ public class BiometricAuthNative extends Plugin {
|
|
|
84
87
|
biometryNameMap.put(BiometryType.IRIS, "Iris Authentication");
|
|
85
88
|
}
|
|
86
89
|
|
|
87
|
-
private BiometryType
|
|
90
|
+
private ArrayList<BiometryType> biometryTypes;
|
|
88
91
|
|
|
89
92
|
/**
|
|
90
93
|
* Check the device's availability and type of biometric authentication.
|
|
@@ -95,15 +98,28 @@ public class BiometricAuthNative extends Plugin {
|
|
|
95
98
|
int biometryResult;
|
|
96
99
|
|
|
97
100
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
|
98
|
-
biometryResult =
|
|
101
|
+
biometryResult =
|
|
102
|
+
manager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_WEAK);
|
|
99
103
|
} else {
|
|
100
104
|
biometryResult = manager.canAuthenticate();
|
|
101
105
|
}
|
|
102
106
|
|
|
103
107
|
JSObject ret = new JSObject();
|
|
104
|
-
ret.put(
|
|
105
|
-
|
|
106
|
-
|
|
108
|
+
ret.put(
|
|
109
|
+
"isAvailable",
|
|
110
|
+
biometryResult == BiometricManager.BIOMETRIC_SUCCESS
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
biometryTypes = getDeviceBiometryTypes();
|
|
114
|
+
ret.put("biometryType", biometryTypes.get(0).getType());
|
|
115
|
+
|
|
116
|
+
JSArray returnTypes = new JSArray();
|
|
117
|
+
|
|
118
|
+
for (BiometryType type : biometryTypes) {
|
|
119
|
+
returnTypes.put(type.getType());
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
ret.put("biometryTypes", returnTypes);
|
|
107
123
|
|
|
108
124
|
String reason = "";
|
|
109
125
|
|
|
@@ -120,10 +136,12 @@ public class BiometricAuthNative extends Plugin {
|
|
|
120
136
|
reason = "There is no biometric hardware on this device.";
|
|
121
137
|
break;
|
|
122
138
|
case BiometricManager.BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED:
|
|
123
|
-
reason =
|
|
139
|
+
reason =
|
|
140
|
+
"The user can’t authenticate because a security vulnerability has been discovered with one or more hardware sensors.";
|
|
124
141
|
break;
|
|
125
142
|
case BiometricManager.BIOMETRIC_ERROR_UNSUPPORTED:
|
|
126
|
-
reason =
|
|
143
|
+
reason =
|
|
144
|
+
"The user can’t authenticate because the specified options are incompatible with the current Android version.";
|
|
127
145
|
break;
|
|
128
146
|
case BiometricManager.BIOMETRIC_STATUS_UNKNOWN:
|
|
129
147
|
reason = "Unable to determine whether the user can authenticate.";
|
|
@@ -141,22 +159,27 @@ public class BiometricAuthNative extends Plugin {
|
|
|
141
159
|
call.resolve(ret);
|
|
142
160
|
}
|
|
143
161
|
|
|
144
|
-
private BiometryType
|
|
162
|
+
private ArrayList<BiometryType> getDeviceBiometryTypes() {
|
|
163
|
+
ArrayList<BiometryType> types = new ArrayList<BiometryType>();
|
|
145
164
|
PackageManager manager = getContext().getPackageManager();
|
|
146
165
|
|
|
147
166
|
if (manager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) {
|
|
148
|
-
|
|
167
|
+
types.add(BiometryType.FINGERPRINT);
|
|
149
168
|
}
|
|
150
169
|
|
|
151
170
|
if (manager.hasSystemFeature(PackageManager.FEATURE_FACE)) {
|
|
152
|
-
|
|
171
|
+
types.add(BiometryType.FACE);
|
|
153
172
|
}
|
|
154
173
|
|
|
155
174
|
if (manager.hasSystemFeature(PackageManager.FEATURE_IRIS)) {
|
|
156
|
-
|
|
175
|
+
types.add(BiometryType.IRIS);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (types.size() == 0) {
|
|
179
|
+
types.add(BiometryType.NONE);
|
|
157
180
|
}
|
|
158
181
|
|
|
159
|
-
return
|
|
182
|
+
return types;
|
|
160
183
|
}
|
|
161
184
|
|
|
162
185
|
/**
|
|
@@ -172,7 +195,7 @@ public class BiometricAuthNative extends Plugin {
|
|
|
172
195
|
// Pass the options to the activity
|
|
173
196
|
intent.putExtra(
|
|
174
197
|
TITLE,
|
|
175
|
-
call.getString(TITLE, biometryNameMap.get(
|
|
198
|
+
call.getString(TITLE, biometryNameMap.get(biometryTypes.get(0)))
|
|
176
199
|
);
|
|
177
200
|
intent.putExtra(SUBTITLE, call.getString(SUBTITLE));
|
|
178
201
|
intent.putExtra(REASON, call.getString(REASON));
|
|
@@ -213,7 +236,9 @@ public class BiometricAuthNative extends Plugin {
|
|
|
213
236
|
|
|
214
237
|
if (data != null) {
|
|
215
238
|
resultTypeName =
|
|
216
|
-
data.getStringExtra(
|
|
239
|
+
data.getStringExtra(
|
|
240
|
+
RESULT_EXTRA_PREFIX + BiometricAuthNative.RESULT_TYPE
|
|
241
|
+
);
|
|
217
242
|
}
|
|
218
243
|
|
|
219
244
|
if (resultTypeName == null) {
|
|
@@ -85,7 +85,7 @@ export interface AuthenticateOptions {
|
|
|
85
85
|
*
|
|
86
86
|
* If `allowDeviceCredential` is false, tapping this button dismisses the
|
|
87
87
|
* authentication dialog and returns the error code userFallback. If undefined,
|
|
88
|
-
* the localized
|
|
88
|
+
* the localized system default title is used. Passing an empty string
|
|
89
89
|
* hides the fallback button completely.
|
|
90
90
|
*
|
|
91
91
|
* If `allowDeviceCredential` is true and this is undefined,
|
|
@@ -135,13 +135,23 @@ export declare class BiometryError implements ResultError {
|
|
|
135
135
|
export interface CheckBiometryResult {
|
|
136
136
|
/**
|
|
137
137
|
* True if the device has biometric authentication capability
|
|
138
|
-
* and the current user has enrolled in biometry.
|
|
138
|
+
* and the current user has enrolled in some form of biometry.
|
|
139
139
|
*/
|
|
140
140
|
isAvailable: boolean;
|
|
141
141
|
/**
|
|
142
|
-
* The type of biometry available on the device.
|
|
142
|
+
* The primary type of biometry available on the device. If the device
|
|
143
|
+
* supports both fingerprint and face authentication, this will be
|
|
144
|
+
* `BiometryType.touchId`.
|
|
143
145
|
*/
|
|
144
146
|
biometryType: BiometryType;
|
|
147
|
+
/**
|
|
148
|
+
* All of the biometry types supported by the device (currently only
|
|
149
|
+
* Android devices support multiple biometry types). If no biometry
|
|
150
|
+
* is available, this will be an empty array. If multiple types
|
|
151
|
+
* are supported, Android only guarantees that one of them is actually
|
|
152
|
+
* available.
|
|
153
|
+
*/
|
|
154
|
+
biometryTypes: BiometryType[];
|
|
145
155
|
/**
|
|
146
156
|
* If biometry is not available and the system gives a reason why,
|
|
147
157
|
* it will be returned here. Otherwise it's an empty string.
|
package/dist/esm/native.js
CHANGED
package/dist/esm/web.js
CHANGED
|
@@ -11,17 +11,18 @@ export class BiometricAuthWeb extends BiometricAuthBase {
|
|
|
11
11
|
return Promise.resolve({
|
|
12
12
|
isAvailable: this.biometryType !== BiometryType.none,
|
|
13
13
|
biometryType: this.biometryType,
|
|
14
|
+
biometryTypes: [],
|
|
14
15
|
reason: '',
|
|
15
16
|
code: BiometryErrorType.none,
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
19
|
async authenticate(options) {
|
|
19
20
|
return this.checkBiometry().then(({ isAvailable, biometryType }) => {
|
|
21
|
+
var _a;
|
|
20
22
|
if (isAvailable) {
|
|
21
23
|
if (
|
|
22
24
|
// eslint-disable-next-line no-alert
|
|
23
|
-
confirm((options === null || options === void 0 ? void 0 : options.reason)
|
|
24
|
-
`Authenticate with ${getBiometryName(biometryType)}?`)) {
|
|
25
|
+
confirm((_a = options === null || options === void 0 ? void 0 : options.reason) !== null && _a !== void 0 ? _a : `Authenticate with ${getBiometryName(biometryType)}?`)) {
|
|
25
26
|
return;
|
|
26
27
|
}
|
|
27
28
|
throw new BiometryError('User cancelled', BiometryErrorType.userCancel);
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -108,17 +108,18 @@ class BiometricAuthWeb extends BiometricAuthBase {
|
|
|
108
108
|
return Promise.resolve({
|
|
109
109
|
isAvailable: this.biometryType !== exports.BiometryType.none,
|
|
110
110
|
biometryType: this.biometryType,
|
|
111
|
+
biometryTypes: [],
|
|
111
112
|
reason: '',
|
|
112
113
|
code: exports.BiometryErrorType.none,
|
|
113
114
|
});
|
|
114
115
|
}
|
|
115
116
|
async authenticate(options) {
|
|
116
117
|
return this.checkBiometry().then(({ isAvailable, biometryType }) => {
|
|
118
|
+
var _a;
|
|
117
119
|
if (isAvailable) {
|
|
118
120
|
if (
|
|
119
121
|
// eslint-disable-next-line no-alert
|
|
120
|
-
confirm((options === null || options === void 0 ? void 0 : options.reason)
|
|
121
|
-
`Authenticate with ${getBiometryName(biometryType)}?`)) {
|
|
122
|
+
confirm((_a = options === null || options === void 0 ? void 0 : options.reason) !== null && _a !== void 0 ? _a : `Authenticate with ${getBiometryName(biometryType)}?`)) {
|
|
122
123
|
return;
|
|
123
124
|
}
|
|
124
125
|
throw new BiometryError('User cancelled', exports.BiometryErrorType.userCancel);
|
|
@@ -161,6 +162,7 @@ class BiometricAuthNative extends BiometricAuthBase {
|
|
|
161
162
|
return Promise.resolve({
|
|
162
163
|
isAvailable: true,
|
|
163
164
|
biometryType: exports.BiometryType.none,
|
|
165
|
+
biometryTypes: [],
|
|
164
166
|
reason: '',
|
|
165
167
|
code: exports.BiometryErrorType.none,
|
|
166
168
|
});
|
package/dist/plugin.js
CHANGED
|
@@ -106,17 +106,18 @@ var capacitorBiometricAuth = (function (exports, core, app) {
|
|
|
106
106
|
return Promise.resolve({
|
|
107
107
|
isAvailable: this.biometryType !== exports.BiometryType.none,
|
|
108
108
|
biometryType: this.biometryType,
|
|
109
|
+
biometryTypes: [],
|
|
109
110
|
reason: '',
|
|
110
111
|
code: exports.BiometryErrorType.none,
|
|
111
112
|
});
|
|
112
113
|
}
|
|
113
114
|
async authenticate(options) {
|
|
114
115
|
return this.checkBiometry().then(({ isAvailable, biometryType }) => {
|
|
116
|
+
var _a;
|
|
115
117
|
if (isAvailable) {
|
|
116
118
|
if (
|
|
117
119
|
// eslint-disable-next-line no-alert
|
|
118
|
-
confirm((options === null || options === void 0 ? void 0 : options.reason)
|
|
119
|
-
`Authenticate with ${getBiometryName(biometryType)}?`)) {
|
|
120
|
+
confirm((_a = options === null || options === void 0 ? void 0 : options.reason) !== null && _a !== void 0 ? _a : `Authenticate with ${getBiometryName(biometryType)}?`)) {
|
|
120
121
|
return;
|
|
121
122
|
}
|
|
122
123
|
throw new BiometryError('User cancelled', exports.BiometryErrorType.userCancel);
|
|
@@ -159,6 +160,7 @@ var capacitorBiometricAuth = (function (exports, core, app) {
|
|
|
159
160
|
return Promise.resolve({
|
|
160
161
|
isAvailable: true,
|
|
161
162
|
biometryType: exports.BiometryType.none,
|
|
163
|
+
biometryTypes: [],
|
|
162
164
|
reason: '',
|
|
163
165
|
code: exports.BiometryErrorType.none,
|
|
164
166
|
});
|
package/ios/Plugin/Plugin.swift
CHANGED
|
@@ -8,6 +8,7 @@ private let kMissingFaceIDUsageEntry = "The device supports Face ID, but NSFaceI
|
|
|
8
8
|
@objc(BiometricAuthNative)
|
|
9
9
|
public class BiometricAuthNative: CAPPlugin {
|
|
10
10
|
let biometryErrorCodeMap: [Int: String] = [
|
|
11
|
+
0: "",
|
|
11
12
|
LAError.appCancel.rawValue: "appCancel",
|
|
12
13
|
LAError.authenticationFailed.rawValue: "authenticationFailed",
|
|
13
14
|
LAError.invalidContext.rawValue: "invalidContext",
|
|
@@ -18,7 +19,7 @@ public class BiometricAuthNative: CAPPlugin {
|
|
|
18
19
|
LAError.userFallback.rawValue: "userFallback",
|
|
19
20
|
LAError.biometryLockout.rawValue: "biometryLockout",
|
|
20
21
|
LAError.biometryNotAvailable.rawValue: "biometryNotAvailable",
|
|
21
|
-
LAError.biometryNotEnrolled.rawValue: "biometryNotEnrolled"
|
|
22
|
+
LAError.biometryNotEnrolled.rawValue: "biometryNotEnrolled"
|
|
22
23
|
]
|
|
23
24
|
|
|
24
25
|
var canEvaluatePolicy = true
|
|
@@ -57,9 +58,13 @@ public class BiometricAuthNative: CAPPlugin {
|
|
|
57
58
|
errorCode = biometryErrorCodeMap[error.code] ?? biometryErrorCodeMap[LAError.biometryNotAvailable.rawValue] ?? ""
|
|
58
59
|
}
|
|
59
60
|
|
|
61
|
+
var types = JSArray()
|
|
62
|
+
types.append(context.biometryType.rawValue)
|
|
63
|
+
|
|
60
64
|
call.resolve([
|
|
61
65
|
"isAvailable": available,
|
|
62
66
|
"biometryType": context.biometryType.rawValue,
|
|
67
|
+
"biometryTypes": types,
|
|
63
68
|
"reason": reason,
|
|
64
69
|
"code": errorCode
|
|
65
70
|
])
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aparajita/capacitor-biometric-auth",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Provides access to the native biometric auth APIs for Capacitor apps",
|
|
5
5
|
"author": "Aparajita Fishman",
|
|
6
6
|
"license": "MIT",
|
|
@@ -53,46 +53,45 @@
|
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@aparajita/capacitor-docgen": "github:aparajita/capacitor-docgen",
|
|
55
55
|
"@aparajita/capacitor-docgen-format": "github:aparajita/capacitor-docgen-format",
|
|
56
|
-
"@aparajita/eslint-config-base": "^1.1.
|
|
57
|
-
"@aparajita/prettier-config": "^
|
|
56
|
+
"@aparajita/eslint-config-base": "^1.1.6",
|
|
57
|
+
"@aparajita/prettier-config": "^2.0.0",
|
|
58
58
|
"@aparajita/swiftly": "^1.0.4",
|
|
59
|
-
"@capacitor/cli": "^5.
|
|
60
|
-
"@commitlint/cli": "^17.
|
|
61
|
-
"@commitlint/config-conventional": "^17.
|
|
59
|
+
"@capacitor/cli": "^5.4.1",
|
|
60
|
+
"@commitlint/cli": "^17.7.2",
|
|
61
|
+
"@commitlint/config-conventional": "^17.7.0",
|
|
62
62
|
"@ionic/swiftlint-config": "^1.1.2",
|
|
63
63
|
"@rollup/plugin-json": "^6.0.0",
|
|
64
|
-
"@types/node": "^20.
|
|
65
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
66
|
-
"@typescript-eslint/parser": "^
|
|
67
|
-
"commit-and-tag-version": "^11.2.
|
|
68
|
-
"eslint": "^8.
|
|
69
|
-
"eslint-config-prettier": "^
|
|
64
|
+
"@types/node": "^20.8.0",
|
|
65
|
+
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
|
66
|
+
"@typescript-eslint/parser": "^6.7.3",
|
|
67
|
+
"commit-and-tag-version": "^11.2.3",
|
|
68
|
+
"eslint": "^8.50.0",
|
|
69
|
+
"eslint-config-prettier": "^9.0.0",
|
|
70
70
|
"eslint-config-standard": "^17.1.0",
|
|
71
|
-
"eslint-import-resolver-typescript": "^3.
|
|
72
|
-
"eslint-plugin-import": "^2.
|
|
73
|
-
"eslint-plugin-n": "^16.
|
|
74
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
71
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
72
|
+
"eslint-plugin-import": "^2.28.1",
|
|
73
|
+
"eslint-plugin-n": "^16.1.0",
|
|
75
74
|
"eslint-plugin-promise": "^6.1.1",
|
|
76
|
-
"nodemon": "^
|
|
77
|
-
"prettier": "^
|
|
78
|
-
"prettier-plugin-java": "^2.1
|
|
79
|
-
"rimraf": "^5.0.
|
|
80
|
-
"rollup": "^3.
|
|
75
|
+
"nodemon": "^3.0.1",
|
|
76
|
+
"prettier": "^3.0.3",
|
|
77
|
+
"prettier-plugin-java": "^2.3.1",
|
|
78
|
+
"rimraf": "^5.0.5",
|
|
79
|
+
"rollup": "^3.29.4",
|
|
81
80
|
"swiftlint": "^1.0.2",
|
|
82
|
-
"typescript": "~5.
|
|
81
|
+
"typescript": "~5.2.2"
|
|
83
82
|
},
|
|
84
83
|
"dependencies": {
|
|
85
|
-
"@capacitor/android": "^5.
|
|
86
|
-
"@capacitor/app": "^5.0.
|
|
87
|
-
"@capacitor/core": "^5.
|
|
88
|
-
"@capacitor/ios": "^5.
|
|
84
|
+
"@capacitor/android": "^5.4.1",
|
|
85
|
+
"@capacitor/app": "^5.0.6",
|
|
86
|
+
"@capacitor/core": "^5.4.1",
|
|
87
|
+
"@capacitor/ios": "^5.4.1"
|
|
89
88
|
},
|
|
90
89
|
"scripts": {
|
|
91
90
|
"clean": "rimraf dist",
|
|
92
91
|
"lint.eslint": "eslint --fix --cache --ext .js,.cjs,.mjs,.ts --max-warnings 0",
|
|
93
92
|
"lint.prettier": "prettier --write --cache --list-different",
|
|
94
93
|
"lint.tsc": "tsc --noEmit",
|
|
95
|
-
"lint": "pnpm lint.eslint . && pnpm lint.prettier
|
|
94
|
+
"lint": "pnpm lint.eslint . && pnpm lint.prettier '**/*.{js,mjs,ts,json,md,java}' && pnpm lint.tsc && swiftly ios",
|
|
96
95
|
"prebuilder": "pnpm clean",
|
|
97
96
|
"builder": "tsc ${SOURCE_MAP:-} && rollup -c rollup.config.mjs",
|
|
98
97
|
"prebuild": "pnpm lint",
|