Spotify API重定向URI具有更改的参数?
我目前正在使用Spotify API。身份验证的请求URL为http:// localhost:8080/app/9 9是用户相应ID的参数。
回调URL也在Spotif开发人员中输入: http:// localhost:8080/app/?
我现在收到错误消息: Invalid_client:无效重定向URI,
我知道这是由于更改的Callbackuri所致。现在的问题。如何为URI中的参数创建通配符?
感谢您的帮助。
I am currently using the Spotify APi. The request URL from which the authentication originates is http://localhost:8080/app/9
The 9 is the parameter for the respective ID of the user.
The callback URL is also entered in Spotif Developer:
http://localhost:8080/app/?
I now get the error message:
INVALID_CLIENT: Invalid redirect URI
I am aware that this is due to the changed CallbackURi. The question now. How do I create a wildcard for the parameter in the URI?
Thanks for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
缺乏理解使我认为必须将用户ID包含在回调URI中。但是,这不仅是一个安全问题,而且由于回调URI必须是静态的,因此它也无效。
因此,我决定解决会话cookie的问题。现在,当用户在登录后首次输入页面时,我保存一个带有会话ID和用户ID的cookie。
如果用户在OAuth2身份验证后返回站点,我会使用缓存的会话cookie。
Lack of understanding made me think that the userID must be included in the callback URI. However, this would not only be a security issue, but it also doesn't work because the callback URI has to be static.
So I decided to solve the problem with session cookies. Now i save a cookie with a session id and the userID when the user first enters the page after logging in.
If the user comes back to the site after the oAuth2 authentication, I use the session cookie that is cached.