针对 Auth0 的 oidc-client-js 的 signoutRedirect 不返回结束会话端点 [英] signoutRedirect of oidc-client-js against Auth0 returns no end session endpoint

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

问题描述

我已经成功地使用了 Brock Allen 的

查看元数据端点表明有一个撤销端点.

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

var 设置 = {权限:'https://susqsofttest.auth0.com/.well-known/openid-configuration',client_id: '我的客户 ID',redirect_uri: 'http://localhost:8080/signin-oidc',post_logout_redirect_uri: 'http://localhost:8080/logout',response_type: 'id_token 令牌',范围:'openid 个人资料电子邮件',revokeAccessTokenOnSignout: 真,自动静音更新:真,filterProtocolClaims: 真,加载用户信息:真};var mgr = 新用户管理器(设置);

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

解决方案

signout redirect 明确查看 idp 中的 Json 属性end_session_endpoint" configuration,我在您的 idp 配置中没有看到该端点,我想,这不是您可以使用 oidc-client.js 包覆盖的内容.

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

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.

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?

解决方案

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.

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 不返回结束会话端点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆