alistairphillips.com

I’m : a web and mobile developer based in the Australia.


OAuth on the iPhone

OAuth is a open protocol to allow secure API authorisation in a simple and standard method from desktop and web applications. Users won't need to provide their username and password to OAuth-enabled sites which makes for a safer internet.

If you're wanting to develop an iPhone application that makes use of an OAuth resource then you've got the following options:

Google Data APIs Objective-C Client Library

Google supply OAuth Controllers for iPhone and Mac Apps which once I got it working (thanks to some excellent assistance from Greg Robbins at Google.) seems to offer the best user experience. Signing in is handling within the application so the user is not thrown out into Mobile Safari. Of course there are debates as to which is better.

To use the the GDataOAuthTouchStaticLibrary in your project you'll need to:

(A local archive of a working project is saved locally)

mpoauthconnection

While I've not yet got a sample application working correctly with this the following steps are useful to get the library included with your project:

Snapup seems to be a good example of using this library as it covers custom URL schemes etc. (a local copy has been archived here)

OAuthConsumer

I did try and use this but think I had terrible issues in getting it to compile. However a sample application, iPhone Updater for Fire Eagle, at http://github.com/fireeagle/fire-eagle-iphone-updater is available which might help. (A local copy has been archived here)

An "iPhone Ready" version is available from http://github.com/jdg/oauthconsumer