1.IdentityServerClientScopes 分配的Scope太多,会报错
“Scope parameter exceeds max allowed length”
在Domain.Shared层改MyAppModuleExtensionConfigurator可以改abp identityserver定义的const值
private static void ConfigureExistingProperties() { ClientScopeConsts.ScopeMaxLength = 1000; }
这表里面字段长度,而Scope parameter validation是identityserver4的包里做的,这样改并没有效果
应该在Host层改变IdentityServerOptions , PreConfigureServices 和 PostConfigureServices 都可以
public override void PreConfigureServices(ServiceConfigurationContext context) { PreConfigure<IdentityServerOptions>(options => { options.InputLengthRestrictions.Scope = 2000; }); PreConfigure<IdentityBuilder>(identityBuilder => { identityBuilder.AddSignInManager<CustomSignInManager>(); }); }