I have a browser extension that uses OAuth2 to retrieve an access token. As recommended by https://api.stackexchange.com/docs/authentication, I use https://stackoverflow.com/oauth/login_success as the value of redirect_uri.

To avoid inadvertently using the access token from other applications, I have inserted a unique identifier in the URL, so that the extension will only use access tokens that it has explicitly requested.

The URL for the OAuth is thus as follows:


Upon succesful authentication, it used to redirect to:

A user recently reported that my extension was broken. This is apparently because they are redirected to the following instead:

Is this a bug in OAuth (and will the value of redirect_uri be respected in a future update)? If not, what is the recommended way to authenticate users and avoid conflicts with other browser extensions that also use the recommended redirect_uri to authenticate users?


I don't think that's a bug, for implicit OAuth. Anyway, if I understand RFC 6749 correctly, that is not how you are supposed to do such extra checks.

Use the state parameter. And this works.

For example, a call to:
(Click the link and try it.)

Yields results like:

When the user authorizes the app.

You must log in to answer this question.

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