The easiest way to authenticate a user in an iPhone application?

I plan to write an application for the iPhone that does not require user registration. However, I would like to associate all registered users with at least an email so that I can send them email notifications if necessary.

  • OpenID - it seems to do what I need, but it does not work on the installed application (if I do not use ... WebView? It is not convenient, they are not optimized for use on mobile devices.

  • OAuth - it seems a mess, and I'm not requesting access to the service ...

  • OAuth 2.0 - It seems better, but not quite Done yet?

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

  • Facebook Connect - heard it’s good, has anyone tried?

Maybe I should support both Google ClientLogin and Facebook Connect? and wait until OAuth2 is ready and peeks in to support Google + Facebook + twitter?

Sentence? A comment? Thanks!

+6
iphone facebook oauth openid
source share
2 answers
+1
source share

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

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

descriptor descriptor:

 - (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 hard part may be fql. But if you have encountered SQL before, this should not be a problem. I already have experience with SQL, and it took me several hours to understand fql and send / receive to facebook.

About Twitter, it's harder because Oauth Authentication requires you more tasks. Getting the Twitter API is easy to get started, but hard to scale further, imo, but it may not be your problem if you only care about user authentication

Twitter currently recommends using XAuth instead of OAuth on Iphone, because it creates a better user interface. Read more about XAuth and OAuth here . We used this library for OAuth, but now that we are switching to XAuth, we have stopped using it.

+3
source share

All Articles