OIDC客户端无法注销。错误:没有结束会话端点

时间:2019-07-14 20:07:39

标签: angular auth0 oidc

我开始使用Auth0作为身份提供者来实现代码流。

登录效果很好,我从Auth0取回了有效令牌。

  

问题:我无法退出。

以下是我遇到的错误。

core.js:9110 ERROR Error: Uncaught (in promise): Error: no end session endpoint
Error: no end session endpoint
    at oidc-client.min.js:1
   ...

这是我的用户管理器配置。

const config = {
    authority: 'https://dev-hidden.eu.auth0.com',
    client_id: '--hidden--',
    redirect_uri: `${window.location.origin}/auth-callback`,
    response_type: 'code',
    scope: 'openid profile',
    automaticSilentRenew: true,
    post_logout_redirect_uri: 'http://localhost:4200/',
    end_session_endpoint: 'https://dev-hidden.eu.auth0.com'
     ^^^ I dont think this does anything but I added it anyway
  };

我尝试了以下操作,但均未退出。

this.userManager.signoutRedirect();
this.userManager.signoutRedirectCallback()

我不确定是客户端还是Auth0问题。

我正在使用oidc-client 1.8.2,但也尝试了其他版本,但结果相同。

预先感谢

1 个答案:

答案 0 :(得分:0)

选中https://YOUR_AUTH0_DOMAIN/.well-known/openid-configuration以找到end_session_endpoint

Auth0可能不支持end_session_endpoint。我检查了https://auth-dev.mozilla.auth0.com/.well-known/openid-configuration,没有end_session_endpoint。但是它们支持revocation_endpoint,这可能需要在您的另一端实施。

也许使用auth0-spa-js会更好  为了你; doc:https://auth0.com/docs/quickstart/spa/angular2

相关问题