You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[local_auth] getAvailableBiometrics does not return "enrolled" biometrics, it returns present hardware on Android #45497
I'd like to enable biometrics authentication on Android if there's enrolled biometrics. As I see it, there's no way to know if there's enrolled biometrics unless you call authenticate method and catch NotEnrolled exception on Android.
/// Indicates the user has not enrolled any fingerprints on the device.
const String notEnrolled = 'NotEnrolled';
I'm assuming enrolled means that the hardware is present and there's at least one configured fingerprint on device according to this comment.
Although, getAvailableBiometrics method is described as:
/// Returns a list of enrolled biometrics
///
/// Returns a [Future] List<BiometricType> with the following possibilities:
/// - BiometricType.face
/// - BiometricType.fingerprint
/// - BiometricType.iris (not yet implemented)
current getAvailableBiometrics returns the list of present hardware on the device, not enrolled biometrics.
if (Build.VERSION.SDK_INT >= 23) {
if (packageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) {
biometrics.add("fingerprint");
}
}
Proposal
As a workaround, I encapsulated the part where we populate ArrayList biometrics with
It serves it purpose well as a workaround but I believe this can result in a false list of biometrics where the device has both fingerprint and face features and only one of them is enrolled.
It would be really great if you could provide a more comprehensive solution to this problem so it returns enrolled biometrics accurately compared to my workaround.
The fact this is missing creates a really bad user experience. Since all devices nowadays have biometrics, it feels like a high priority bug to fix.
Reacted by Kevin Valette, thomas-doussin, Rohit Garg, flenair, Denis Kovalev, Bruno Viana de Siqueira, Mauricio Aviles, Pablo Dávila and Mehmet Akif DERE
I don't mean to be rude, but how come this still is not fixed yet? This is a serious issue, giving the user bad UX while asked to use biometrics when they even haven't enrolled any biometrics in their phones (by that case it's most likely they even don't know about that). We never had these issues until newer versions.
Reacted by Mauricio Aviles, Bruno Viana de Siqueira, TharaniP and kopianan
Unfortunately, we can´t afford to assign anyone to work on this right away since the team is purely focused on meeting regulatory requirements to meet a government deadline. Especially without having a guarantee from Google that it will be reviewed in a timely manner.
The issue has been open for almost two years, has lots of comments and upvotes, affects any Android device that has two biometric and fingerprint hardware, and the proposed workaround does not solve the underlying issue. What else is needed to raise the priority of this issue to something above P3?
Community - please help upvoting this issue and post if this is relevant to you.
Reacted by Sebastian Büchler, Mehmet Akif DERE and Bruno Viana de Siqueira
The issue has been open for almost two years, has lots of comments and upvotes
Many issues have been open for several years, and many have lots of comments and upvotes. This isn't even in the top 250 issue by votes, to provide some context. We understand that people want this fixed, and we do too, but the same is true of all of those other issues as well. We are prioritizing across a very large workload. We, like you, are engineering-resource constrained.
What else is needed to raise the priority of this issue to something above P3?
Any updates on this? Still facing this problem in 1.1.9. Using a device supporting both finger and face. None of them is set and when running canCheckBiometric and isDeviceSupported they both return true. When running getAvailableBiometrics it returns BiometricType.fingerprint and BiometricType.face. Even when running authenticate inside a try-catch it still crashes. Console gives the error Unhandled Exception: PlatformException(NotEnrolled, No biometrics enrolled on this device., null, null).
Reacted by TheManuz, Stephany Juárez, Alexander Bosak and Dinesh K Masthaiah
Any updates on this? Still facing this problem in 1.1.9. Using a device supporting both finger and face. None of them is set and when running canCheckBiometric and isDeviceSupported they both return true. When running getAvailableBiometrics it returns BiometricType.fingerprint and BiometricType.face. Even when running authenticate inside a try-catch it still crashes. Console gives the error Unhandled Exception: PlatformException(NotEnrolled, No biometrics enrolled on this device., null, null).
This PR flutter-team-archive/plugins#4682 should fix this. Now with this PR canCheckBiometrics returns false on Android if device has the biometric hardware but it doesn't have any biometric enrolled.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
ben04 commentedon Mar 31, 2020
I'm facing the same problem, a solution would be great!
lzhuor commentedon Apr 2, 2020
Facing the same problems.
us3soap commentedon Apr 6, 2020
Same problems
evelyne24 commentedon Apr 7, 2020
The fact this is missing creates a really bad user experience. Since all devices nowadays have biometrics, it feels like a high priority bug to fix.
stuartmorgan-g commentedon Apr 2, 2021
Marking as a bug, rather than a feature request, since it's inconsistent with the iOS implementation.
Dohmanlechx commentedon Jun 9, 2021
I don't mean to be rude, but how come this still is not fixed yet? This is a serious issue, giving the user bad UX while asked to use biometrics when they even haven't enrolled any biometrics in their phones (by that case it's most likely they even don't know about that). We never had these issues until newer versions.
8 remaining items
mxa0079 commentedon Aug 5, 2021
Thanks @stuartmorgan - could we get a commitment to get a timely review of the PR if we do so? Will it get accepted without tests?
stuartmorgan-g commentedon Aug 5, 2021
I can make an effort to prioritize a review; I can't specifically commit to how exactly it will balance against other priorities.
No, the contribution guide is very clear about the testing requirements for PRs.
mxa0079 commentedon Aug 10, 2021
Hello @stuartmorgan - thanks for your reply.
Unfortunately, we can´t afford to assign anyone to work on this right away since the team is purely focused on meeting regulatory requirements to meet a government deadline. Especially without having a guarantee from Google that it will be reviewed in a timely manner.
The issue has been open for almost two years, has lots of comments and upvotes, affects any Android device that has two biometric and fingerprint hardware, and the proposed workaround does not solve the underlying issue. What else is needed to raise the priority of this issue to something above P3?
Community - please help upvoting this issue and post if this is relevant to you.
stuartmorgan-g commentedon Aug 10, 2021
Many issues have been open for several years, and many have lots of comments and upvotes. This isn't even in the top 250 issue by votes, to provide some context. We understand that people want this fixed, and we do too, but the same is true of all of those other issues as well. We are prioritizing across a very large workload. We, like you, are engineering-resource constrained.
Flutter's escalation policy for issues is described here: https://github.com/flutter/flutter/wiki/Issue-hygiene#when-will-my-bug-be-fixed
doc-rj-celltrak commentedon Sep 1, 2021
Slight correction @mxa0079 -- this impacts any Android device with any biometrics support, not just those with two (or more) types of biometrics.
HungryBytesApps commentedon Jan 7, 2022
Any updates on this? Still facing this problem in 1.1.9. Using a device supporting both finger and face. None of them is set and when running
canCheckBiometricandisDeviceSupportedthey both returntrue. When runninggetAvailableBiometricsit returnsBiometricType.fingerprintandBiometricType.face. Even when runningauthenticateinside a try-catch it still crashes. Console gives the errorUnhandled Exception: PlatformException(NotEnrolled, No biometrics enrolled on this device., null, null).darwin-morocho commentedon Jan 19, 2022
This PR flutter-team-archive/plugins#4682 should fix this. Now with this PR canCheckBiometrics returns false on Android if device has the biometric hardware but it doesn't have any biometric enrolled.
MingSern commentedon Mar 22, 2022
Any solution for this? Really need the
enrolledbiometric valuevigdora commentedon Apr 18, 2022
any update on this?
github-actions commentedon May 6, 2022
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.