Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I am developing a client side application, what kind of domain should I provide to 0Auth callback? Can it be a custom application-centric scheme (like myapp://oauthcallback/)?

share|improve this question
up vote 2 down vote accepted

For native applications (ie. Desktop apps), in order to participate in an OAuth 2.0 flow you need to embed a browser control (or otherwise instrument one so you can read the current location, including hash) and do an implicit (ie. Client Side) flow with a redirect_uri of When you detect navigation to that url, you need to read the hash out and proceed like a normal client side app.

This detail is buried down at bottom of our authentication docs for the moment.

During registration, desktop apps can have anything in the Domain field. I'd suggest setting it to the same domain as your website, just in case you want a more traditional flow there in the future (of course, you can edit your app's domain at any time).

Finally, no, you cannot use custom schemes for your redirect_uris. Only HTTP and HTTPS, and even then you should really try to use HTTPS if at all possible.

share|improve this answer
So I can even put something like localhost/oauthCallback and then just track my http client being redirected to that URL with provided parameters? – Eimantas Dec 8 '11 at 17:14
@Eimanthas - if you registered localhost as your domain, yes. Not much benefit over redirecting to the provided url though. – Kevin Montrose Dec 8 '11 at 20:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .