Henry
Henry

Reputation: 32905

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.

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!

Upvotes: 6

Views: 1791

Answers (2)

Henry
Henry

Reputation: 32905

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

Upvotes: 1

vodkhang
vodkhang

Reputation: 18741

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.

Upvotes: 3

Related Questions