Oauth 2.0 [OAuth][keydape]尝试使用刷新令牌时,无效的\u授予会话未处于活动状态

Oauth 2.0 [OAuth][keydape]尝试使用刷新令牌时,无效的\u授予会话未处于活动状态,oauth-2.0,keycloak,openid-connect,refresh-token,Oauth 2.0,Keycloak,Openid Connect,Refresh Token,我试图使用ClientAuth2.token.refresh()刷新oauth2令牌,但有时会出现错误: {“错误”:“授权无效”,“错误描述”:“会话未激活”} 这就是我被Fiddler捕获的请求 POST [URL]= HTTP/1.1 Host: [URL] Connection: keep-alive Content-Length: 2250 Accept: application/json, application/x-www-form-urlencoded Origin: http:

我试图使用ClientAuth2.token.refresh()刷新oauth2令牌,但有时会出现错误:
{“错误”:“授权无效”,“错误描述”:“会话未激活”}

这就是我被Fiddler捕获的请求

POST [URL]= HTTP/1.1
Host: [URL]
Connection: keep-alive
Content-Length: 2250
Accept: application/json, application/x-www-form-urlencoded
Origin: http://localhost:8080
Authorization: Basic YXNpbW92LWRldi1laGlzLXdlYjo=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36
Sec-Fetch-Mode: cors
Content-Type: application/x-www-form-urlencoded
Sec-Fetch-Site: cross-site
Referer: http://localhost:8080/
Accept-Encoding: gzip, deflate, br
Accept-Language: en,vi;q=0.9,de;q=0.8,vi-VN;q=0.7,en-US;q=0.6,en-AU;q=0.5

refresh_token=[token]&grant_type=refresh_token

也许我在KeyClope帐户上的设置有问题。有什么建议吗?

可能是您的刷新令牌授权消息不完整-缺少客户端ID或脱机访问作用域-请参阅我的文章中有关OAuth消息的部分。

在检索原始令牌时,您需要添加作用域,否则,当相关用户会话未激活时,您将无法刷新它(这是针对OIDC的,而不是oauth2)。

这是因为您已从客户端应用程序注销。这就是为什么它会显示错误。

链接现在已失效:(