【发布时间】:2022-01-03 23:02:59
【问题描述】:
我使用 .net core 3.1 创建了一个身份服务器,但是当我尝试获取令牌时出现此错误。
这是我的 appsettings.json 文件
"Clients": [
{
"ClientId": "portal-api",
"AlwaysIncludeUserClaimsInIdToken": true,
"AllowOfflineAccess": true, //support refresh tokens
"AccessTokenLifetime": 3600,
"RequireConsent": false,
"ClientSecrets": [ { "Value": "lxl76J788Cvf1ds8CQJuFYGwTi7e3BXGCRK2JIUekmk=" } ],
"AllowedGrantTypes": [ "password", "code" ],
"AllowedScopes": [ "rest.auth" ],
"RefreshTokenUsage": "OneTimeOnly",
"RequireClientSecret": true,
"Enabled": true
}
]
},
【问题讨论】:
-
您能发布您如何在 Startup.cs 中配置 IdentityServer 吗?您确定这些设置实际上是从 appsettings 应用的吗?
标签: asp.net-core identityserver4