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
Unnecessary biometryLockout UI handling in LocalAuthPlugin.swift #173142
Based on Apple's official documentation and the observed behavior on modern iOS devices, the operating system already handles the UI for biometric lockout. When Touch ID or Face ID is locked, iOS presents its own system-level alert and prompts the user to enter their passcode.
Because the system manages this UI, the custom showAlert in the Flutter code is never displayed to the user, making this block of code effectively dead or unreachable.
Expected Behavior
The app should rely on the native iOS handling for biometric lockouts. No custom alert should be necessary.
Proposal
I suggest removing the case .biometryLockout and its associated showAlert call. This will clean up the codebase by removing redundant code and align the plugin's behavior with the standard, native iOS user experience.
In the video, you are tapping the regular authentication button, which corresponds to using the .deviceOwnerAuthentication. The docs for this error code are:
I.e., it's only intended to be returned when using .deviceOwnerAuthenticationWithBiometrics instead of deviceOwnerAuthentication. In local_auth, that's biometricOnly = true, which is the last button in the UI.
making this block of code effectively dead or unreachable.
I would expect that the other button will still hit this codepath. (If it were impossible to ever get this error code in modern versions of iOS, Apple would normally have deprecated the enum value, as they have in the past with other enum values that their SDKs can no longer return.)
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
stuartmorgan-g commentedon Aug 2, 2025
In the video, you are tapping the regular authentication button, which corresponds to using the
.deviceOwnerAuthentication. The docs for this error code are:I.e., it's only intended to be returned when using
.deviceOwnerAuthenticationWithBiometricsinstead ofdeviceOwnerAuthentication. Inlocal_auth, that'sbiometricOnly = true, which is the last button in the UI.I would expect that the other button will still hit this codepath. (If it were impossible to ever get this error code in modern versions of iOS, Apple would normally have deprecated the enum value, as they have in the past with other enum values that their SDKs can no longer return.)
[local_auth] Adopt structured errors, and remove `useErrorDialogs` (f…
github-actions commentedon Oct 30, 2025
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.[local_auth] Adopt structured errors, and remove `useErrorDialogs` (f…