3

I want to implement Apple's touchId/FaceId for my app. Currently the app has Login screen, where the user enters the userId and password. I submit the userId and password to the back end server(located at let's say https://example.com/Login?username=abc&password=xyz@123(just an example)). The backend server returns me authentication cookies. This cookies I use to access the rest of the rest api services I am reading a number of articles which tells about how you can use Apple's touch Id with https://developer.apple.com/documentation/localauthentication framework. It displays the generic pop up asking the use the touch Id, and returns true if the touch Id authentication is successful.

My question comes up here. If I use the touch Id and the authentication is successful. How do I proceed? Basically, I would need the authentication cookies to access the rest apis.

One flow I am assuming is. When the user enables the touchId/faceId in settings page of my app, I store the usercredentials in the keychain. Once the user is logged out, and the user uses touch Id and authentication is successful, I access the keychain, retrieve the password for the user, call the api https://example.com/Login?username=abc&password=xyz@123 get the authentication cookies and use them for accessing the rest of the web apis.

Is my assumption correct? Or there is a better way of implementing it? Any examples or references would be great.

Thanks.

Md Naushad
  • 147
  • 1
  • 11
  • I believe that is going to be the best way to handle things. – hvaughan3 Jan 15 '18 at 14:52
  • While your problem is interesting, the question itself is way too broad and you are asking for off-site resources or tutorials. This does not suit the Q&A style of Stack Overfow. Please refer to the [How to ask](https://stackoverflow.com/help/how-to-ask) doc. – Cheesebaron Jan 15 '18 at 19:31
  • I tried adding as much details possible to the question. Will read the doc and here on I will ask the question in a better way. – Md Naushad Jan 17 '18 at 06:29
  • @MdNaushad HiDid you achieve implementing your use case. if yes let me know to handleI am also looking for the same. – Ganesh Nov 28 '18 at 06:42
  • @Ganesh - I hope you found your answer, If not let me know. – Md Naushad Aug 28 '19 at 11:06

0 Answers0