Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

Why, when I'm requesting /oauth/dialog and selecting either of the options I get redirected to the same URL with different hash values? It's not a bug per-se, just an observation I made while developing an app.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

This is just how OAuth 2.0 indicates rejection, you get different values on the redirect (either in the hash for the implicit client side flow, or in proper query string parameters for the explicit server side flow).

Instead of code or access_token (depending on the flow the app is using) you get error and error_description. When a user rejects you get error=access_denied.

share|improve this answer
    
but shouldn't it return different status code (sorry if it already does) or get redirected to different URL (login_failure instead of login_success)? –  Eimantas Dec 11 '11 at 19:57
1  
@Eimantas - nope, not if it's a compliant OAuth 2.0 implementation. Responses should be 302's (redirects) or 200s (pages displayed as normal to users saying an error was encountered). –  Kevin Montrose Dec 11 '11 at 21:11
add comment

You must log in to answer this question.

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