new Client
{
ClientId = "admin.ui",//同域同端口使用一个ClientId可以避免登录闪退,Oidc.js也用这个ClientId
ClientName = "admin系统设置",
AllowedGrantTypes = GrantTypes.Implicit,
//ClientSecrets = new []{ new Secret(appSettings.AdminUI.Secret.Sha256()) },
RequireConsent = false, //同意
AllowAccessTokensViaBrowser = true,
AccessTokenLifetime = appSettings.AdminUI.AccessTokenLifetime, //2小时 = 3600 * 2
//SlidingRefreshTokenLifetime = 3600 * 24, //1天 = 3600 * 24
//AllowOfflineAccess = true,
//AlwaysIncludeUserClaimsInIdToken = true,
RedirectUris = appSettings.AdminUI.RedirectUris,
PostLogoutRedirectUris = appSettings.AdminUI.PostLogoutRedirectUris,
AllowedCorsOrigins = appSettings.CorUrls,
AllowedScopes =
{
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile,
}
},
IdentityServer+WebApi+Vue+Oidc.js登录闪退问题
总有一些人过着你想要的生活