Bug: SoundCloud OAuth2 connection will fail if Redirect URI includes “&” character

走远了吗. 提交于 2019-12-12 18:41:24

问题


I'm getting an error while connecting to Sound API trought OAuth2.

This is the connection link I use:

https://soundcloud.com/connect?client_id=27e07408838149bc81b98928b76468f9&redirect_uri=http%3A%2F%2Fbeta.mydomain.com%2Fapd%2F%3Fmodule%3Dsoundcloud%26action%3Dreturn&response_type=code&consumer_key=28e07409898149a981b98928b76468f9

By clicking it I get redirected to:

http://beta.mydomain.com/apd/?module=soundcloud&action=return&error=redirect_uri_mismatch&error_description=The+redirection+URI+provided+does+not+match+a+pre-registered+value.

But the specified redirect_uri param (encoded) and the registered url (in the field Redirect URI) are exactly the same:

http://beta.mydomain.com/apd/?module=soundcloud&action=return

I don't know if there is anything wrong or there is any other restriction that returns the same error. Or maybe "Redirect URI" is not the applicable field. This should be enough.

(App name is bigpress) (Domain and consumer_key have been altered for security reasons)

UPDATE: Ok, I think I got it. After having done a dozen of checks... if redirect_uri includes the "&" character SoundCloud will always return this error.

来源:https://stackoverflow.com/questions/11570311/bug-soundcloud-oauth2-connection-will-fail-if-redirect-uri-includes-charac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!