标签: angular-auth-oidc-client

B2C认证不返回access_token

我正在尝试使用 PKCE 一个有角度的项目来实现授权代码流。我正在使用 angular-auth-oidc-client。我们已经有一个基于 IdentityServer4 的现有内部实施,客户端可以很好地配合该实施,但我们现在正在尝试将身份验证迁移到 Azure AD B2C,而不是在内部实施。

我已经配置了 Azure AD B2C 和我的客户端应用程序。这是配置: 我的应用程序配置

这是我在客户端 OIDC 服务上的配置:

oidcConfigService.withConfig({
    stsServer: 'https://login.microsoftonline.com/mycompany.onmicrosoft.com/v2.0',
    authWellknownEndpoint:
        'https://mycompany.b2clogin.com/mycompany.onmicrosoft.com/B2C_1_SignUpSignIn/v2.0/.well-known/openid-configuration',
    redirectUrl: window.location.origin,
    postLogoutRedirectUri: window.location.origin,
    clientId: 'client-id-guid-goes-here',
    scope: 'openid profile offline_access',
    responseType: 'code',
    silentRenew: true,
    autoUserinfo: false,
    silentRenewUrl: window.location.origin + '/silent-renew.html',
    logLevel: LogLevel.Debug,
    renewTimeBeforeTokenExpiresInSeconds: 60
});
Run Code Online (Sandbox Code Playgroud)

问题:令牌响应中没有访问令牌: 没有access_token

即使我在客户端配置中选中了 accesss_token 复选框。我在这里缺少什么?

access-token openid-connect azure-ad-b2c pkce angular-auth-oidc-client

4
推荐指数
2
解决办法
4794
查看次数