admin管理员组文章数量:1293920
I am trying to connect to a new OAuth Identity Provider from my Angular app. The logout is implemented with an userManager.signoutRedirect()
call to UserManager
provided by oidc-client-ts.
Logout works well with my old Identity Provider, where the /token/revocation
endpoint called under the hood returns without Content-Type header (Content-Length is 0) But the new OAuth server returns the Content-Type: text/plain; charset=utf-8 header (still without actual content), which results in the following error:
ERROR Error: Invalid response Content-Type: text/plain; charset=utf-8, from URL: .../token/revocation.
The response status is 200 OK
.
Is there a way I can set the Accept header on my logout request with the oidc-client-ts library, or any other fix for this issue?
I am trying to connect to a new OAuth Identity Provider from my Angular app. The logout is implemented with an userManager.signoutRedirect()
call to UserManager
provided by oidc-client-ts.
Logout works well with my old Identity Provider, where the /token/revocation
endpoint called under the hood returns without Content-Type header (Content-Length is 0) But the new OAuth server returns the Content-Type: text/plain; charset=utf-8 header (still without actual content), which results in the following error:
ERROR Error: Invalid response Content-Type: text/plain; charset=utf-8, from URL: .../token/revocation.
The response status is 200 OK
.
Is there a way I can set the Accept header on my logout request with the oidc-client-ts library, or any other fix for this issue?
Share asked Feb 12 at 14:35 AnnoszAnnosz 1,0327 silver badges25 bronze badges1 Answer
Reset to default 0I've found the solution at https://github/authts/oidc-client-ts/issues/1650.
There is a parameter which can be set in the UserManagerSettings
:
const settings: UserManagerSettings = {
authority: ...,
client_id: ...,
redirect_uri: ...,
revokeTokenAdditionalContentTypes: ['text/plain; charset=utf-8'],
};
本文标签: openid connectInvalid response contenttype on logout with oidcclientts in AngularStack Overflow
版权声明:本文标题:openid connect - Invalid response content-type on logout with oidc-client-ts in Angular - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741591523a2387156.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论