Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[local_auth][iOS]: NotAvailable error code is thrown when user taps on "Don't allow" while trying to allow FaceId recognition. #102734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ankesh-kumar opened this issue Apr 28, 2022 · 7 comments
Labels
p: local_auth Plugin for local authentification P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically r: invalid Issue is closed as not valid

Comments

@ankesh-kumar
Copy link

Steps to reproduce:

  • call localAuth.authenticate() in iOS device having face recognition only,
  • It shows a dialog "Do you want to allow app to use Face Id " with two button " Don't allow " and "OK".
  • Tap on " Don't allow ".

It will treat as code-> NotAvailable.
It should be treat with different code and should call the dialog again.

@ankesh-kumar ankesh-kumar changed the title [local_auth] Face recognition dialog showing not available when user tap on "Don't allow" in iOS [local_auth] error code is NotAvailable when user tap on "Don't allow" in iOS Apr 28, 2022
@darshankawar darshankawar added the in triage Presently being triaged by the triage team label Apr 28, 2022
@darshankawar
Copy link
Member

@ankesh-kumar
Thanks for the report. Although I don't have iOS device with face recognition, so can't verify this behavior at my end.

It will treat as code-> NotAvailable.
It should be treat with different code and should call the dialog again.

Does it mean, after tapping Don't allow, it throws `not available error ? If so, can you provide complete error log ?

should call the dialog again.

You mean it should again show the dialog ?

For example, if we deny any permission for an app by tapping don't allow, it doesn't show the dialog again right ?

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Apr 28, 2022
@ankesh-kumar
Copy link
Author

ankesh-kumar commented Apr 28, 2022

@darshankawar
I am using following code:

try {
      await localAuth.authenticate(
        useErrorDialogs: true,
        biometricOnly: true,
      );
    } on PlatformException catch (e) {
      print(e.code);  **_// it is printing  "NotAvailable_**
    }

Biometric not available and Biometric is disallowed by the end-user are two complete different scenario. For both exception and message should be different. So, Developer can prompt message accordingly. Like if it is disallow , We can guide user to allow Face-Recognition from his device Settings. Hope it make sense.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Apr 28, 2022
@darshankawar
Copy link
Member

Thanks for the feedback. Keeping it open and labeling for further insights from the team.

@darshankawar darshankawar added plugin p: local_auth Plugin for local authentification platform-ios iOS applications specifically and removed in triage Presently being triaged by the triage team labels Apr 29, 2022
@darshankawar darshankawar changed the title [local_auth] error code is NotAvailable when user tap on "Don't allow" in iOS [local_auth][iOS]: NotAvailable error code is thrown when user taps on "Don't allow" while trying to allow FaceId recognition. Apr 29, 2022
@stuartmorgan-g stuartmorgan-g added the P2 Important issues not at the top of the work list label May 5, 2022
@Krunal-Aubergine
Copy link

@ankesh-kumar found any solution? I'm facing the same issue.

@jmagman
Copy link
Member

jmagman commented Dec 28, 2022

@LouiseHsu can you try this flow on top of your flutter/plugins#6821 PR (local_auth_ios 1.0.11) and update this issue with your findings?

@LouiseHsu
Copy link
Contributor

Hi! After debugging this issue, I've discovered that this is working correctly, as this is in line with what Apple's API is returning. if an end user disallows biometrics to be used, it is intended behaviour that the app will not be able to determine if biometrics are supported on the device, thus the "NotAvailable". Closing the issue.

@LouiseHsu LouiseHsu added the r: invalid Issue is closed as not valid label Dec 29, 2022
@github-actions
Copy link

github-actions bot commented Mar 4, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2023
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p: local_auth Plugin for local authentification P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically r: invalid Issue is closed as not valid
Projects
None yet
Development

No branches or pull requests

6 participants