tags:

views:

34

answers:

2

i wonder how do desktop apps without any domain names use oauth? or is it not supposed to be used this way? if so what do i use? say for tumblr they have an authentication api so i will have to put the username and password in the url/query string?

i am thinking of using WPF/Adobe AIR. how does something like tweetdeck work?

A: 

You should start by reading about getting started with OAuth. Eventually, even a desktop application will open a browser window to authenticate the user - TweetDeck and other Twitter clients do this, as you've probably noticed.

Tumblr, in your example, doesn't use OAuth but rather basic authentication that is being performed via simple HTTP web requests.

Dennis Delimarsky
but if a desktop opens a browser window to authenticate it wont really be on a domain which is required to create an app with oauth right. i will read the link tho
jiewmeng
It will actually be a domain that can confirm the OAuth token. To give you an example of a real-world OAuth powered service (other than Twitter), take a look at Vimeo: http://vimeo.com/api/docs/oauth
Dennis Delimarsky
hmm, i notice that but how does my domain come into play? eg. my app will call my domain to authenticate the request or something? Sorry, i am a little confused
jiewmeng
A: 

Twitter doesn't want users entering their credentials into your application. So at some point the desktop app will need to open a browser window through which Twitter can authenticate their users and return an access token representing the user. From that point the desktop app can use the access token to represent the user in all subsequent API calls to Twitter.

Addys
Ok I understand the point of opening a browser, but if the call was made from a desktop app with no domain name, what do I enter for the domain name when registering? even if I have a domain name, what is the relation between the desktop app and the domain name? Like must the app make a request to that domain name or something?
jiewmeng
your application will issue a call to Twitter - it is Twitter's auth mechansim which will accept the user's credentials and return a token. Depending on Twitter's implementation, you *may* need to provide a callback URL which Twitter can use to return control to your application once the user has completed the authentication flow. Does that help?
Addys