samples-ios
samples-ios copied to clipboard
Biometrics Not Working
Describe the bug?
I'm attempting to use the iOS SDK to enable biometric login and it always prompts me for my passcode instead of FaceID.
What is expected to happen?
The call to secureStorage.getData
prompts for FaceID to unlock the phone
What is the actual behavior?
The call to secureStorage.getData
prompts me for my passcode to unlock the phone
Reproduction Steps?
- Add a new line of code on line 72 of SignInViewController:
print(self.secureStorage.isTouchIDSupported() || self.secureStorage.isFaceIDSupported())
- Install the OktaSignInAndStorage project on your phone
- Sign into your Okta tenant, verify that "true" is printed in the console
- Tap on "tokens", a view that should retrieve secure storage leveraging biometrics.
Additional Information?
No response
SDK Version(s)
okta-storage-swift@master
okta-oidc-ios@master
Build Information
Xcode version: 13.3 (13E113) iPhone 12, v15.4.1
Stumbled on this SO answer: https://stackoverflow.com/a/46853211/1061011
And sure enough adding even a blank value for the key NSFaceIDUsageDescription
in Info.plist
allows the app to prompt for FaceID before falling back to the passcode. Is there a reason this isn't included in the sample?
I needed to add an entry in Info.plist as well.
This was the issue for me as well, perhaps this should be documented in the appropriate repo