Skip to content

Commit 2aba852

Browse files
Update Capacitor example app for biometric changes
1 parent 916894a commit 2aba852

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

example/capacitor/src/pages/Home.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import authgearCapacitor, {
4444
BiometricOptions,
4545
BiometricAccessConstraintIOS,
4646
BiometricLAPolicy,
47-
BiometricAccessConstraintAndroid,
47+
BiometricAuthenticatorAndroid,
4848
WebKitWebViewUIImplementation,
4949
DeviceBrowserUIImplementation,
5050
} from "@authgear/capacitor";
@@ -76,15 +76,22 @@ const REDIRECT_URI_CAPACITOR = "com.authgear.exampleapp.capacitor://host/path";
7676
const biometricOptions: BiometricOptions = {
7777
ios: {
7878
localizedReason: "Use biometric to authenticate",
79+
localizedCancelTitle: "Customized Cancel",
7980
constraint: BiometricAccessConstraintIOS.BiometryCurrentSet,
8081
policy: BiometricLAPolicy.deviceOwnerAuthenticationWithBiometrics,
8182
},
8283
android: {
8384
title: "Biometric Authentication",
8485
subtitle: "Biometric authentication",
8586
description: "Use biometric to authenticate",
86-
negativeButtonText: "Cancel",
87-
constraint: [BiometricAccessConstraintAndroid.BiometricStrong],
87+
negativeButtonText: "Customized Cancel",
88+
allowedAuthenticatorsOnEnable: [
89+
BiometricAuthenticatorAndroid.BiometricStrong,
90+
],
91+
allowedAuthenticatorsOnAuthenticate: [
92+
BiometricAuthenticatorAndroid.BiometricStrong,
93+
BiometricAuthenticatorAndroid.DeviceCredential,
94+
],
8895
invalidatedByBiometricEnrollment: true,
8996
},
9097
};

0 commit comments

Comments
 (0)