【发布时间】:2020-11-05 11:57:41
【问题描述】:
let usrMgr = new UserManager({
authority: "https://localhost:5001/",
client_id: "clientname",
redirect_uri: "https://localhost:3000/login/callback.html",
response_type: "id_token token",
scope: "openid"
});
usrMgr.signinRedirect();
我正在使用oidc-client-js 如上所示,通过我们的身份服务器进行身份验证。
在尝试进行身份验证时,我从身份服务器收到以下错误
我的身份服务器上的客户端是这样的
{
"Enabled": true,
"ClientId": "clientname",
"ClientName": "Some Client Name",
"AllowedGrantTypes": "implicit",
"AllowedScopes": [ "openid", "profile", "email", "id:custom" ],
"AllowOfflineAccess": true,
"PostLogoutRedirectUris": [ "https://localhost:3000/signout-callback-oidc" ],
"RedirectUris": [ "https://localhost:3000/login/callback.html" ],
"FrontChannelLogoutUri": "https://localhost:3000/signout-oidc",
"AllowAccessTokensViaBrowser": true
}
我将 AllowAccessTokensViaBrowser 设置为 true,并将 AllowedGrantTypes 设置为隐式。
知道为什么我会收到“客户端未配置为通过浏览器接收访问令牌错误吗?
【问题讨论】:
标签: javascript authentication identityserver4 openid