来自coinbase的oauth2重定向将重置并再次请求授权

kiz8lqtg  于 2021-09-30  发布在  Java
关注(0)|答案(0)|浏览(466)

我目前正在开发一个依赖于连接coinbase的应用程序,并且依赖oauth2进行授权。
在阅读并观看了关于通过spring实现它的教程之后,我能够打开coinbase的授权请求页面,但无法重定向以检索令牌。当它重定向时,它会转到用于建立授权的同一端口(localhost:8080)。在其他教程中,我看到应用程序正确地处理了这个问题并继续,但应用程序却再次启动授权页面。
我想知道的是,一旦发生重定向,spring应该如何检索令牌/代码?如果我将重定向更改为用于启动授权的url之外的其他内容(8080改为其他数字),那么我会在浏览器中看到包含代码的url,但我的应用程序无法以编程方式使用它(除非我复制粘贴,但这不合适)。如果重定向是8080,那么它会重新启动进程,我不能使用传递的代码。这可能是一个简单的错误,但我感谢任何反馈,因为我对这一点还是新手。

security.oauth2.client.clientId=[redacted]
security.oauth2.client.clientSecret=[redacted]
security.oauth2.client.scope=wallet:accounts:read
security.oauth2.client.accessTokenUri=http://www.coinbase.com/oauth/token
security.oauth2.client.userAuthorizationUri=https://www.coinbase.com/oauth/authorize
security.oauth2.resource.userInfoUri=https://www.coinbase.com/oauth/authorize
security.oauth2.resource.preferTokenInfo=true
security.oauth2.client.pre-established-redirect-uri=http://127.0.0.1:8080
security.oauth2.client.registered-redirect-uri=http://127.0.0.1:8080
security.oauth2.client.use-current-uri=false

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题