【问题标题】:OIDC-client Cant log out. Error: no end session endpointOIDC 客户端无法注销。错误:没有结束会话端点
【发布时间】:2019-11-23 15:01:49
【问题描述】:

我开始使用 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,但也尝试了其他版本,结果相同。

提前致谢

【问题讨论】:

    标签: angular auth0 openid-connect


    【解决方案1】:

    检查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会更好 为你;文档:https://auth0.com/docs/quickstart/spa/angular2

    【讨论】:

    • 所以我想作为一个进一步的问题。 OIDC 客户端如何支持使用 auth0 注销?
    【解决方案2】:

    就我而言(OpenID Connect + Google)revokeAccessToken() 为我解决了问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-30
      • 2022-07-28
      • 2021-07-20
      • 2018-11-23
      • 1970-01-01
      • 2014-05-26
      • 2020-04-10
      • 1970-01-01
      相关资源
      最近更新 更多