I am using Twitter digits to log in/authenticate users in my Swift app. Essentially, I just want users to not have to enter their phone number and then enter the 6 digit verification code, every time they open and close my app. I can't find any documentation on this particular point that explains how this is accomplished? Is this handled behind the scenes by Twitter Digits, and if not how do I do it?
What is a secure way to stop users having to log in with Twitter Digits every time they open my app?
Asked
Active
Viewed 57 times
1 Answers
0
I'm not so much familiar with native Swift applications but I'm using local storage approach in Phonegap development.
You should store the username and password value in local storage at first time, then you need to check if username and password in local storage are set when user opens your app again.
If yes, log him/her in with current stored datas. If not, just forward him/her to register part of your app.
You may take a look at how to use local storage in Swift: How to save local data in a Swift app?
-
I'm confused though because digits doesn't have a password. Do I just save the verification code they got texted as their password? – HelloCoding Jul 27 '16 at 03:12
-
Is it giving any profile id or something when user logged in? If so, you may use it either. – Lala Jul 27 '16 at 03:15
-
OR when you logged the user in, you can store user id that your app generated for current user. Then use it again. – Lala Jul 27 '16 at 03:17