File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -84,14 +84,23 @@ export default function App() {
84
84
// fallbackLabel ?: string;
85
85
86
86
// Authenticate use with Biometrics (Fingerprint, Facial recognition, Iris recognition)
87
- const biometricPrompt = await LocalAuthentication . authenticateAsync (
88
- 'Touch the screen to'
89
- ) ;
87
+ let promptMessage ;
88
+ supportedBiometrics === 1
89
+ ? ( promptMessage = 'Please touch sensor when ready' )
90
+ : 'Use face recognition' ;
91
+
92
+ const biometricAuth = await LocalAuthentication . authenticateAsync ( {
93
+ promptMessage : 'Login with Biometrics' ,
94
+ cancelLabel : 'Cancel' ,
95
+ disableDeviceFallback : true ,
96
+ } ) ;
97
+ // Log the user in on success
98
+ if ( biometricAuth ) console . log ( 'success' ) ;
90
99
91
100
console . log ( { isBiometricAvailable } ) ;
92
101
console . log ( { supportedBiometrics } ) ;
93
102
console . log ( { savedBiometrics } ) ;
94
- console . log ( { biometricPrompt } ) ;
103
+ console . log ( { biometricAuth } ) ;
95
104
} ;
96
105
97
106
return (
You can’t perform that action at this time.
0 commit comments