Skip to content

Unnecessary biometryLockout UI handling in LocalAuthPlugin.swift #173142

@okorohelijah

Description

@okorohelijah

The current implementation attempts to show a custom alert when biometrics are locked out after too many failed attempts:

https://github.com/flutter/packages/blob/main/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin/Sources/local_auth_darwin/LocalAuthPlugin.swift#L384-L391

The Issue

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.

IMG_7855.mov

Metadata

Metadata

Labels

P2Important issues not at the top of the work listp: local_authPlugin for local authentificationpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyplatform-macBuilding on or for macOS specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions