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.

I moved my app to a different server as part of a rewrite, and forgot to update the URL of the app on Stack Apps. When I tried to send a query to https://stackexchange.com/oauth and pass my (old, incorrect) callback URL to the redirect_uri parameter, this is the error I got:

Application Login Failure

An error occurred while login into an application.

Error Details

error description: Cannot return to provided redirect_uri

I’m still debugging, so I don’t know for sure that that was the issue, but either way, this error message could be a lot more helpful. I don’t know if this is the right place to file a bug/question like this, so I’m happy to post this elsewhere.

Update: I pointed the app at my new domain, and it’s working now, so it was a domain mismatch. I’m leaving this open in case it counts as a support request, because this took several hours to debug. Even after I had fixed the domain, I had a typo that meant I was getting the same error message. Just printing out the received and expected URLs would have made the problem instantly clear.

share|improve this question
That message at least points in the right direction without compromising security. Printing out the expected URL would be a security hole. Maybe a message to make sure the two URL/domains match -- without providing details? –  Brock Adams Jul 4 at 6:34
Good point. What about showing the part of the sent parameters that are wrong, and telling you what part of the configuration to look in to see if they match? –  Zev Eisenberg Jul 4 at 11:38
Might be good. Specify. –  Brock Adams Jul 4 at 12:16

You must log in to answer this question.

Browse other questions tagged .