Using OAuth with Flex and Force.com | Salesforce Developers Blog

Just finished putting a fork into a new project for our github account, the Flex-RESTkit.  This is ActionScript you can use to make REST calls to the REST API, but it also includes connections for using an OAuth Connection, which you can use with the existing Flex Toolkit if you wanted to substitute an OAuth connection for the standard login flow, particularly if you were building a desktop AIR application.  It's also compatible with the just released Flash Builder 4.5's mobile project.  The only difference with the mobile project is that you need to make use of the OAuthConnectionMobile class, instead of the main OAuthConnection class – as the mobile projects use StageWebView instead of HTMLLoader.

Here's a video of getting OAuth working with the existing SOAP toolkit.  Just include both libraries in your project, and follow the code below – and your Force.com AIR project will be OAuth enabled in no time.  I'll be delivering posts and videos on using the REST portion in the near future (probably next week).  The readme on the project has further details if you're wanting to tinker with it right away.

 

Stay up to date with the latest news from the Salesforce Developers Blog

Subscribe