Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Easiest way to authenticate user in iPhone app?

I'm planning to write an iPhone app that does not require user to register. However, I would like to associate all registered user with at least an email so that I can send them email notifications when needed.

  • OpenID - seems to do what I need, but it doesn't work well on an installed app (unless I use... WebView? Even that is not user friendly since they're not optimized for mobile use.

  • OAuth - seems like a mess, and I'm not asking for access to its service...

  • OAuth 2.0 - seems better, but not quite ready yet as of now?

  • Google's ClientLogin - seems to work well, anyone use this with iPhone app?

  • Facebook Connect - heard it is good, anyone tried?

Maybe I should support both Google's ClientLogin and Facebook Connect? and wait till OAuth2 is ready and look into that to support Google + Facebook + twitter?

Suggestion? Comment? Thanks!

like image 881
Henry Avatar asked Jul 29 '10 01:07

Henry


People also ask

How do you authenticate an app on iPhone?

A QR code appears to help you set up an authenticator app. On iPhone, use the camera to scan the QR code. On iPhone, select your account for the website or app. A verification code appears below the User Name and Password fields.

Does iOS have authenticator app?

Thanks to iOS 15, Apple has a built-in authenticator to help secure any websites and apps that support the feature. And if you're interested in better protecting your accounts, check out the best password managers to use for 2022 and how to transfer your Google Authenticator accounts if you've bought a new phone.

How do you get 2 way authentication on iPhone?

If your Apple ID account isn't already using two-factor authentication, go to Settings > [your name] > Password & Security. Tap Turn On Two-Factor Authentication, then tap Continue.


2 Answers

In our application, we use Facebook and Twitter. Facebook Connect is great. Really easy to do authentication, just few lines of codes:

session = [FBSession sessionForApplication:myApiKey secret:myAppSecret delegate:self];

handle delegate:

- (void)session:(FBSession*)session didLogin:(FBUID)uid 

and add the login button:

FBLoginButton* button = [[[FBLoginButton alloc] init] autorelease]; 
[self.view addSubview:button];

More info here.

The tricky part maybe the fql. But if you experienced about SQL before, it should not be a problem. I already have experience on SQL and it took me few hours to understand fql and post/get in facebook.

About Twitter, it is harder, because the Oauth Authentication requires more jobs from you. The Get API of Twitter is easy to start but hard to scale further, imo, but may not be your problem if you only care about user authentication

Currently, in Iphone, Twitter recommends us to use XAuth instead of OAuth because it creates better User Experience. More about XAuth and OAuth here. We used this library before for OAuth, but now when we change to XAuth, we stopped using it.

like image 130
vodkhang Avatar answered Sep 21 '22 05:09

vodkhang


found this yesterday: http://www.janrain.com/products/engage/mobile

like image 30
Henry Avatar answered Sep 20 '22 05:09

Henry