Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Face ID write and read values from and into the keychain

Tags:

ios

face-id

I did understand how the Access with Touch ID's kSecAccessControlTouchIDAny in the framework KeychainAccess works but i couldn't figure out how to do this with Face ID in iOS 11. I couldn't find any documentation for solving it yet (Maybe the docs are not out yet?).

So i am seeking out to stackoverflow and ask: How to write values secured with Face ID to the keychain and how to copy them back?

An minimal example would be nice.

like image 568
BennX Avatar asked Sep 12 '17 20:09

BennX


People also ask

Can Face ID be used with passwords?

No problem. You can manually add the credentials for any password-protected website. To do this, open Settings > Accounts & Passwords > App & Website Passwords. Face ID scans your face to grant you access to your existing list of password-protected sites.

Where is the data from Face ID stored?

Face ID data does not leave your device, and is never backed up to iCloud or anywhere else. If you choose to enroll in Face ID, you can control how it is used or disable it at any time.

Why does iPhone ask for password instead of Face ID?

Sometimes you'll need to enter your account password instead of using Face ID: If your face isn't recognized five times in a row. If the amount of time in Settings > Security > “Require password” has elapsed. If you reset Face ID or set up an alternate appearance on your device.

Does iPhone save Face ID attempts?

Face images captured during normal operation aren't saved, but are instead immediately discarded once the mathematical representation is calculated for either enrollment or comparison to the enrolled Face ID data.


1 Answers

This appears to now work in Xcode 9.1 (since beta).

Testable with example here:

https://developer.apple.com/library/content/samplecode/KeychainTouchID/Introduction/Intro.html

Even though this example has not been updated for Face ID, it appears to work for storing keychain items protected by Face ID.

As discussed, this does not work in Xcode 9.0 GM.

like image 76
Daniel Avatar answered Sep 22 '22 15:09

Daniel