hi
The error is
The token request was rejected because invalid scopes were specified: ["ManagementService","Trainm"].
Have you created the ManagementService and Trainm scopes?
eg:
private async Task CreateScopesAsync()
{
if (await _scopeManager.FindByNameAsync("MyProjectName") == null)
{
await _scopeManager.CreateAsync(new OpenIddictScopeDescriptor
{
Name = "MyProjectName",
DisplayName = "MyProjectName API",
Resources =
{
"MyProjectName"
}
});
}
}
hi
As a future feature, do you plan to handle the reload scenario directly from the menu?
Almost no one needs to reload the page, you can customize it like that.
Thanks.
hi
The containerWidth does not support configuration at this time. I will create an internal issue.
Thanks.
hi
You can send an email to liming.ma@volosoft.com
I will share the Zoom link. Please share your screen.
Thanks.
hi
Can you also override the EfCoreIdentityUserRepository?
The main problem is that user has too many organizations. then .Include(x => x.OrganizationUnits) will take long time.
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.Identity.EntityFrameworkCore;
namespace TestUsersLoad.EntityFrameworkCore;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(EfCoreIdentityUserRepository), typeof(IIdentityUserRepository))]
public class MyEfCoreIdentityUserRepository : EfCoreIdentityUserRepository
{
public MyEfCoreIdentityUserRepository(IDbContextProvider<IIdentityDbContext> dbContextProvider) : base(dbContextProvider)
{
}
public override async Task<IdentityUser?> FindByNormalizedUserNameAsync(
string normalizedUserName,
bool includeDetails = true,
CancellationToken cancellationToken = default)
{
return await (MyIncludeDetails(await GetDbSetAsync(), includeDetails))
.OrderBy(x => x.Id)
.FirstOrDefaultAsync(
u => u.NormalizedUserName == normalizedUserName,
GetCancellationToken(cancellationToken)
);
}
private static IQueryable<IdentityUser> MyIncludeDetails(IQueryable<IdentityUser> queryable, bool include = true)
{
if (!include)
{
return queryable;
}
return queryable
.Include(x => x.Roles)
.Include(x => x.Logins)
.Include(x => x.Claims)
.Include(x => x.Tokens);
//.Include(x => x.OrganizationUnits);
}
}
hi
Can you try this?
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpEntityOptions>(options =>
{
options.Entity<IdentityUser>(identityUserOptions =>
{
identityUserOptions.DefaultWithDetailsFunc = queryable =>
{
return queryable
.Include(x => x.Roles)
.Include(x => x.Logins)
.Include(x => x.Claims)
.Include(x => x.Tokens);
//.Include(x => x.OrganizationUnits);
};
});
});
}
Thanks. I will download and check it.
👍
hi
I am still unable to reproduce the problem.
Can you share such a project?
Thanks.
hi
I mean, can you add some code to insert organizations to show the problem?
Thanks.