views:

333

answers:

2

I'm just fleshing out some ideas for an iphone web app and it's going to be (in essence) a CRUD interface to a Rails web backend. Ultimately that backend will be a full blown website too.

My question is: what's the best way to handle "logging in" on the iPhone app? How should it authenticate to allow the user to see their data and add new stuff?

For Rails I generally use Authlogic, so it'd be nice if I could keep doing that.

+4  A: 

Check out this sample app available on GitHub. It has both the iPhone and Rails implementation and uses keychains on the iPhone side while RESTfully connecting using JSON/XML to the Rails server.

You can use whatever authentication solution you want on the Rails side as long as it has an interface that's available to the iPhone app. This app uses Ryan Bates' simpler nifty_authentication for authentication.

bensie
Never seen the http://iphoneonrails.com/ project so that's worth a green tick alone. Thanks!
colinramsay
Yes, ObjectiveResource is a fantastic resource -- glad to help!
bensie
A: 

Have you think about using Authlogic's single access token option for this. I'm working on a app exactly same as yours. (yet this API call part is not implemented fully) but have a look in to the authlogic example on github.

randika