Search code examples
ioscordovaionic-frameworkionic-view

Can i have more than one key for TouchId?


I have an ionic app, and my user wants to login with using different users but with the same FaceId, for example. My question is, can i have more than one key for my app on IOS? What's the best way to implement this?


Solution

  • The LocalAuthentication API just gives you a boolean true/false to the question "did the user successfully authenticate?". In fact, the iOS system only expects TouchID/FaceID to be used by one person. Thus, there's no way to have TouchID/FaceID tell you which user it authenticated, only that a user successfully authenticated. You'll have to implement some kind of choose-a-user flow yourself and then invoke LocalAuthentication