js的signoutRedirect不返回任何结束会话终结点

js的signoutRedirect不返回任何结束会话终结点

本文介绍了针对Auth0的oidc-client-js的signoutRedirect不返回任何结束会话终结点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我已经成功使用了Brock Allen的 oidc-client-js 库使用Auth0作为我的身份提供者对我的SPA应用进行身份验证.但是,当我尝试使用该库将用户注销mgr.signoutRedirect({state: "my test"})时,收到错误消息:no end session endpoint.

I've successfully used the oidc-client-js library by Brock Allen to authenticate my SPA app with Auth0 acting as my Identity Provider. However, when I try to use the library to sign the user out mgr.signoutRedirect({state: "my test"}), I receive an error: no end session endpoint.

查看元数据终结点,表明存在一个撤销终结点

A look at the metadata endpoint shows that there is a revocation endpoint.

我已经像这样配置了oidc-client-js库:

I've configured the oidc-client-js library like so:

var settings = {
   authority: 'https://susqsofttest.auth0.com/.well-known/openid-configuration',
   client_id: 'my client id',
   redirect_uri: 'http://localhost:8080/signin-oidc',
   post_logout_redirect_uri: 'http://localhost:8080/logout',
   response_type: 'id_token token',
   scope: 'openid profile email',
   revokeAccessTokenOnSignout: true,
   automaticSilentRenew: true,
   filterProtocolClaims: true,
   loadUserInfo: true
};
var mgr = new UserManager(settings);

对我所缺少的东西有什么想法吗?

Any ideas of what I'm missing?

推荐答案

注销重定向直接在idp中查看Json属性"end_session_endpoint" 配置,我在您的idp配置中看不到该端点,而且我想这不是您可以使用oidc-client.js包覆盖的东西.

signout redirect explicitly looking at the Json property "end_session_endpoint" in your idp configuration, I do not see that endpoint in your idp configuration, and I guess, this is not something that you can override with oidc-client.js package.

查看有关它们如何从元数据中检索端点URL的信息. https://github.com/IdentityModel/oidc-client-js/blob/dev/src/OidcClient.js#L124

Check this out on how they are retrieving the endpoint url from metadata.https://github.com/IdentityModel/oidc-client-js/blob/dev/src/OidcClient.js#L124

这篇关于针对Auth0的oidc-client-js的signoutRedirect不返回任何结束会话终结点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 16:56