Skip to content
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

[local_auth_darwin] Handle when FaceID hardware is available but permissions have been denied for the app #8348

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

jmagman
Copy link
Member

@jmagman jmagman commented Dec 26, 2024

LocalAuth -canEvaluatePolicy:: returns error LAErrorBiometryNotAvailable when either Face ID isn't available at the hardware level, OR the Face ID is available/setup but the permissions for the app were denied.

If it returns LAErrorBiometryNotAvailable, also check biometryType since this should be none if there really is no biometry, but gets populated with LABiometryTypeTouchID when the FaceID hardware is available, but permission is denied. I tried this on a iPhone 16 Pro which has Face ID but not Touch ID support.

Fixes flutter/flutter#160083

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@jmagman jmagman changed the title [local_auth_darwin] Handle when biometry hardware is available but permissions have been denied for the app [local_auth_darwin] Handle when FaceID hardware is available but permissions have been denied for the app Dec 26, 2024
@jmagman jmagman self-assigned this Dec 26, 2024
@jmagman jmagman force-pushed the local-auth-not-available branch from f1a3d67 to cafcf97 Compare January 10, 2025 04:24
@jmagman jmagman marked this pull request as ready for review January 15, 2025 22:27
@jmagman jmagman requested a review from LouiseHsu as a code owner January 15, 2025 22:27

var error: FlutterError?
let result = plugin.deviceCanSupportBiometricsWithError(&error)
XCTAssertFalse(result!.boolValue)
XCTAssertNil(error)
}

func testDeviceSupportsBiometrics_withBiometryNotAvailableLoadedBiometryType() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its not super clear to me what "loadedBiometryType" means in this context
maybe testDeviceSupportsBiometrics_withBiometryNotAvailableWhenPermissionsDenied?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed this comment somehow.
#8499

Copy link
Contributor

@LouiseHsu LouiseHsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EL GEE TEE EM

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 17, 2025
@auto-submit auto-submit bot merged commit cfc56a2 into flutter:main Jan 17, 2025
77 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 20, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Jan 20, 2025
flutter/packages@f73cb00...e8f1f63

2025-01-20 [email protected] [in_app_purchase] Update Play
Billing library to 7.1.1 (flutter/packages#8218)
2025-01-20 [email protected] Roll Flutter from
5517cc9 to b9e86a5 (22 revisions) (flutter/packages#8458)
2025-01-18 [email protected] [pigeon] Update analyzer and
formatter (flutter/packages#8456)
2025-01-17 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump the gradle-plugin group across 3 directories with 1
update (flutter/packages#8328)
2025-01-17 [email protected] [local_auth_darwin] Handle when FaceID
hardware is available but permissions have been denied for the app
(flutter/packages#8348)
2025-01-16 [email protected] Roll Flutter from
40c2b86 to 5517cc9 (28 revisions) (flutter/packages#8441)
2025-01-15 [email protected] [in_app_purchase_storekit] expose
`jsonRepresentation` for Transactions (flutter/packages#8430)
2025-01-15 [email protected] Roll Flutter (stable) from
17025dd to 68415ad (4 revisions) (flutter/packages#8434)
2025-01-15 [email protected]
[video_player_avfoundation] fix playback speed resetting
(flutter/packages#7657)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: local_auth platform-ios platform-macos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[local_auth] canCheckBiometrics returns false when Face ID permission isn't granted
2 participants