infinum / Android-Goldfinger

Android library to simplify Biometric authentication implementation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error after upgrading on 2.1.0

alexschled opened this issue · comments

Hello,

after upgrading from 2.0.1 to 2.1.0 I get following error while using the fingerprint sensor:

java.lang.IllegalArgumentException: Crypto-based authentication is not supported for Class 2 (Weak) biometrics. at androidx.biometric.BiometricPrompt.authenticate(BiometricPrompt.java:946) at co.infinum.goldfinger.GoldfingerImpl$3.run(GoldfingerImpl.java:251) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8177) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)

Can you help me to solve this?

I tried to add the AllowedAuthenticators(BiometricManager.Authenticators.BIOMETRIC_WEAK), but getting the same error

Thank you guys

Hello @alexschled,
In the 2.1.0 release the BiometricManager.Authenticators.BIOMETRIC_WEAK authenticator is added by default if any other authenticators aren't specified.
The issue appears when trying to use Crypto based authentication together with BIOMETRIC_WEAK authenticator which is not allowed by Google. Instead you should use BIOMETRIC_STRONG authenticator that is supported on a device.