How to relate the touch id fingerprint to a user

3

How can I relate the fingerprint to a username and password? That is, I can know that fingerprint is good and I have it registered in the mobile, but if that mobile is shared and I have several tracks registered, in my app how do I know which user that footprint belongs to?

Let's say that with the fingerprint A register the user pepe in the app, but with the B fingerprint how do I know if it is also the user pepe or if it would be a new user?

    
asked by Alejandro 16.02.2017 в 15:01
source

2 answers

1

You can relate a fingerprint stored on a device with a user and a password. To do this, you must import the LocalAuthentication.framework framework and use its methods. For more information look at the following link provided by the Apple documentation:

link

On the other hand, to link the fingerprint with a user and a password, I would use Keychain to store both in the secure site of the device. Apple provides us with a wrapper (you can include it with Cocoapods through this link: link ) to be able to implement the operations with this framework. Previously you will have to import the framework Security.framework in the options of the project.

Below is an example of how to use TouchID with Keychain.

link

Finally, answering your last question: No, it is not possible to detect between different traces stored in a device. The TouchID framework what it does is detect fingerprints and return success in case the fingerprint matches the ones stored and registered in your device or error, otherwise.

I hope I have helped you.

Greetings.

    
answered by 24.04.2017 / 18:26
source
3

At the operating system level it is not possible to differentiate between several users , so you do not have the option to know if the traces registered belong to different people really.

You can have X fingerprints registered (of as many people as you want), but at the moment of requesting the authentication with Touch ID the system will indicate if the fingerprint is valid or does not have it registered . It does not offer you any differentiation by which physical person has registered it, it assumes that they are all of the same. (Until the user profiles are implemented in the Operating System)

link

    
answered by 16.02.2017 в 17:17