JamesSedlacek / LocalAuthenticationKit

SwiftUI library for handling local authentication
MIT License
47 stars 5 forks source link

Not seeing the Face ID authentication #6

Closed jamestapping closed 10 months ago

jamestapping commented 10 months ago

I'm only ever asked for password never Face ID dialog.

Tested on physical and simulator , same result. (iPhone 13 mini)

JamesSedlacek commented 10 months ago

Is Face ID enabled on the device?

JamesSedlacek commented 10 months ago

For simulators you have to tap on 'enroll' for FaceID

jamestapping commented 10 months ago

Yes face-id is enabled on the device. And for the simulator I tried enrolling.

iOS 17.2.1 / iPhone 13 mini

JamesSedlacek commented 10 months ago

Can you include screenshots/screen recordings? I'll take a look into this tomorrow

jamestapping commented 10 months ago

Ok will do, I just pulled it out of the project but will try again later. Thanks

jamestapping commented 10 months ago

Hiya, Here is a screen recording, hope it's useful.

On a physical device the button would show as on.

Thanks

https://github.com/JamesSedlacek/LocalAuthenticationKit/assets/68062208/916622cd-84e8-4662-aaca-ce5a97b03c77

JamesSedlacek commented 10 months ago

This is what Apple's documentation says. So I can assume that it's because biometry is either not available, not enrolled, or locked out. LocalAuthenticationKit uses the 1st party LocalAuthentication package.

/// Device owner will be authenticated by biometry or device passcode.
///
/// @discussion Biometric or passcode authentication is required. If the biometry is available, enrolled and
///             not locked out, users are asked for it first. Otherwise they are asked to enter device
///             passcode. If passcode is not enabled, policy evaluation will fail with LAErrorPasscodeNotSet.
jamestapping commented 10 months ago

Ah ok, I probably need to import LocalAuthentication in my project? I'll try that