I have a situation here (and at least at one user) where BiometricStorage.canAuthenticate() returns success but when actually writing to a storage we get the following exception:
I/flutter ( 8748): PlatformException(Unexpected Error, java.lang.IllegalStateException: At least one biometric must be enrolled to create keys requiring user authentication for every use, java.security.InvalidAlgorithmParameterException: java.lang.IllegalStateException: At least one biometric must be enrolled to create keys requiring user authentication for every use
I/flutter ( 8748): java.security.InvalidAlgorithmParameterException: java.lang.IllegalStateException: At least one biometric must be enrolled to create keys requiring user authentication for every use
I/flutter ( 8748): at android.security.keystore2.AndroidKeyStoreKeyGeneratorSpi.engineInit(AndroidKeyStoreKeyGeneratorSpi.java:262)
I/flutter ( 8748): at android.security.keystore2.AndroidKeyStoreKeyGeneratorSpi$AES.engineInit(AndroidKeyStoreKeyGeneratorSpi.java:63)
I/flutter ( 8748): at javax.crypto.KeyGenerator.init(KeyGenerator.java:519)
I/flutter ( 8748): at javax.crypto.KeyGenerator.init(KeyGenerator.java:502)
I/flutter ( 8748): at design.codeux.biometric_storage.CryptographyManagerImpl.getOrCreateSecretKey(CryptographyManager.kt:179)
I/flutter ( 8748): at design.codeux.biometric_storag
I/flutter ( 8748): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7)
I/flutter ( 8748): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18)
i could locally only reproduce it when there is no lock screen mechanism set, but the user says he has a fingerprint set up
(maybe there is some combination of settings that does not correctly detect this?)
I have a situation here (and at least at one user) where
BiometricStorage.canAuthenticate()
returnssuccess
but when actually writing to a storage we get the following exception:i could locally only reproduce it when there is no lock screen mechanism set, but the user says he has a fingerprint set up (maybe there is some combination of settings that does not correctly detect this?)