Matt Warren
Matt Warren

Reputation: 10291

Using the AppHarbor oauth api from a desktop app

The documentation for the AppHarbour oauth API only shows how to perform oauth within a web site, i.e. using a redirect_uri

GET https://appharbor.com/user/authorizations/new?client_id=:client_id&redirect_uri=:http://mysite.com/home/auth

This ends up re-directing to http://mysite.com/home/auth?&code=ACCESS_CODE

But is there a way to get the ACCESS_CODE value back as part of the GET? I'm looking to use the AppHarbour api within a desktop app. I can use an embedded web-browser to open a web page so that the user can authenticate my app, but I don't have a re-direct url for it to return to?

How can I use the api to do this?

Upvotes: 1

Views: 204

Answers (1)

friism
friism

Reputation: 19279

UPDATE: We've pushed an update to the SDK to make desktop client auth really easy. Check out the blog post: http://blog.appharbor.com/2012/06/21/oauth-for-net-desktop-applications

AppHarbor does not yet support the specs for getting tokens from non-web apps.

The AppHarbor CLI has a web service that it uses to retrieve token, you could stand up your own. You can see the implementation here. DON'T use this web service to get tokens, you should have your own service using the correct client id.

We're looking at implementing the correct flow for non-web apps.

Upvotes: 1

Related Questions