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

提前致谢

检查 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

就我

而言(OpenID Connect + Google(,revokeAccessToken()为我做了这个技巧。

最新更新