I'd like to integrate the new login framework from Facebook, Account Kit (which among others provides phone login), to my iOS app, which uses Parse.
I was able to integrate the framework successfully; i.e., I was able to complete the flow: user inputs his phone number -> gets an SMS with a code -> enter it and successfully get a token.
What I’m not sure is what do to next — how to follow up with the integration to Parse?
Other related questions which came to my mind are:
1. Do I need also some Cloud code to deal with it?
2. How do I check if the current user is a new or existing user?
I’d love for any help...
Not only Cloud Code, I guess. You need to integrate this in your Parse Server.
Another way
If you can't do server stuffs, there is lazy, crappy and bad way to implement the integration. But this solves the problem.
The method is
Get the user's phone number after user has logged-in with phone number.
Develop an Algorithm that will generate password from the given phone number.
NSString generatePassword(NSString phone)
After the user has logged-in with accountkit, check if his phone number is already at Parse
If the user's phone number is not at Parse, signUpInBackground(phonenumber, generatePassword(phonenumber), callback)
Unless, logInInBackgroud(phonenumber, generatePassword(phonenumber), callback)
Hope this would help :)
Related
We currently have a solution where we implement 2FA ourselves over Twilio Programmable SMS.
We're also using Twilio Verify for Payment PSD2 authorization.
We're now looking to migrate everything to Authy to make use of the Authy app and I have the following questions that I'm hoping you can help me with.
User Migration. I understand in authy, users need to be registered to our application. How can I register all our current users? Is there any way to bulk upload them, or do I have to write a script that calls the API to register them one by one?
User Number phone update. Sometimes our users will update their phone or email in our system. If that happens, how do I update that info in Authy? I couldn't find anything in the docs about that. Do I need to call the api to remove the user and readd with the new info?
Migrating from Verify PSD2 to Authy PSD2. Is the implementation very different? Is there any sample I can look through, as the documentation seems to mainly be talking about QR codes, while what we want to do, is to send it over SMS or Authy depending on the user's choice.
Thanks for your help
Sam
Twilio developer evangelist here.
You will need to write a script to register your users. When you have registered a user, you will receive an authy_id for the user, which you will need to store with your user record.
If a user updates their phone number then you should update the Authy user. To do so, you will want to delete the old user and re-register with the new phone number. You will then receive a new authy_id and you should re-confirm the user can authenticate by challenging them for a new code before you complete the update. If the user updates their email then you can do the same process of deleting and creating a new user though you should receive the same authy_id back if the phone number hasn't changed (though this will add the email address to Authy's representation of the user).
Check the documentation on PSD2 compliant authentication with Authy here. If you are sending SMS messages, then you should set the action and action_message parameters, which tie the message to the authentication. For the app based authentications you can do it via Push Notifications (in which you can include transaction details in the push). If you don't want to implement push, then you do need to get your user to scan a QR code in order to tie the transaction to the authentication (the regular code generated by the app is not connected to a transaction, so is ineligible for PSD2 authentication).
Let me know if this helps at all.
I'm building a small email app (on iOS first) for internal team use only. We also have a Slack team that I'm rolling out to the whole group (about 250 people) around the same time I'm launching the app.
I'm going to have a lot of older and tech-phobic users, so I'm trying to make things as easy as possible for them. Since I'm writing the email app, I figure to making on-boarding even easier I can:
Check if they've got the Slack app installed (via the canOpenURL method)
Send them to the App Store to download if they don't
Open the Slack app for them if they do
Look for the magic login email
Automatically open the URL from the email.
All that is great, but it would be fantastic if I could trigger sending that email automatically and don't even need to send them to manually put in the team URL and their email. Anybody know a way?
CLARIFICATION:
One big reason I want to do this that I didn't make very clear is that when the Slack app sends the email it prompts you to go to your email app to receive your login link, but since iOS doesn't allow changing the default email app, it will send them to the wrong one for my user's purposes.
Sure. If you already have the emails of your target group you can generate the invitation mails programmatically with a small script.
You will need to use the undocumented API method users.admin.invite for that.
Background
I use Twitter's Digits SDK in an app for sign-in, essentially allowing the Users to sign-in quickly use an existing (previously verified by a web app) mobile numbers. This has worked great during internal testing and everyone likes the feature.
Digits SDK
This is part of Twitter's Fabric SDK. It provides a view controller that appears, allows a User to type in a phone number, verify it with a 6-digit code sent via SMS, and it returns auth tokens, etc.
Problem
In order for Apple to review my app, I have to provide a phone number where an Apple employee can receive an SMS [from the Digits verification service] so to be able to authenticate and test my app.
Problem is, I've already tried a number of "Read SMS online" services, but none are receiving the codes from Twitter / Digits. Without a solution, I'm don't have a way for the Apple review team to get past the first menu of my app.
Any ideas? Thank you.
I'm building an iOS (Swift) app that needs realtime chat as part of the functionality. While Parse works well for push, data storage, etc..., it doesn't support realtime. I would like to use Firebase for the realtime support, but need help authenticating to Firebase using a Parse user. I really don't know where to start with this. Any help would be greatly appreciated.
The question is pretty vague so a definitive answer is not possible: here's a thought.
Firebase and Parse are two different companies and therefore require separate authentications.
If your users have a username/password type authentication in Parse, you could use the same data in Firebase and authenticate through code. i.e. User creates a new account in Parse, and an account is created in Firebase via code. When the user authenticates to Parse, it also authenticates to Firebase via code.
There are a LOT of design elements to consider in going this route: how do you create a firebase user (in code) without your app authenticating itself as a 'super' user? Hard code credentials? That may be a security issue.
Are you going to keep two sets of user data? One in Parse and one in Firebase? What if a user needs to reset their password or account. As you can see, it can get out of control rather quickly.
You may want to consider sticking with one platform to simplify the entire process. By the sound of at least one of the requirements, Firebase can do much of what Parse can do but also give the real-time updates you need.
I am currently working out of india and am trying to get to make my app post on behalf of my Twitter user account. However, for me to be able to do this, I need to create write access to my app on twitter, which I tried to. Unfortunately, twitter gives me the following error:
Error
You must add your mobile phone to your Twitter profile before granting your application write capabilities. Please read https://support.twitter.com/articles/110250-adding-your-mobile-number-to-your-account-via-web for more information
Now, I tried to add my mobile phone number following these instructions. Twitter, does not support any of the Indian mobile carriers in order to authenticate the same.
Is there a work around? Is there any way I can make write access work from here?
There are two ways to do this.
The official way to do this is to contact the Twitter API team directly using this form https://support.twitter.com/forms/platform
The unofficial way is
Authenticate against mobile.twitter.com (use your phone or computer).
Go to Settings
Go to Phone
Add
Add your mobile
A "manage" link should be available
All being well, you'll get a confirmation SMS
I've not tried this method - but I have seen other people say it works.