You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your ABP Framework version
v4.3.0-rc2
Your User Interface type (Angular/MVC/React... etc.) if the issue is related to a specific UI
MVC
Your database provider(EF Core/MongoDB)
EF Core
Description:
I want to add custom claim to CurrentUser And I do as recommendation in bellow link: #8073 (comment)
But when login error occurred:
An unhandled exception occurred while processing the request.
InvalidOperationException: only a single identity supported
IdentityServer4.Hosting.IdentityServerAuthenticationService.AssertRequiredClaims(ClaimsPrincipal principal)
Steps needed to reproduce the problem.
abp new Acme.BookStore --preview
Add MyClaimsPrincipalContributor(detail see below code) class in Acme.BookStore.Domain project
public class MyClaimsPrincipalContributor : IAbpClaimsPrincipalContributor, ITransientDependency
{
public Task ContributeAsync(AbpClaimsPrincipalContributorContext context)
{
var claimsIdentity = new ClaimsIdentity();
claimsIdentity.AddIfNotContains(new Claim("Organization", "OrganizationValue"));
context.ClaimsPrincipal.AddIdentity(claimsIdentity);
return Task.CompletedTask;
}
}
In BookStoreDomainModule.cs module add below code in ConfigureServices:
Your ABP Framework version
v4.3.0-rc2
Your User Interface type (Angular/MVC/React... etc.) if the issue is related to a specific UI
MVC
Your database provider(EF Core/MongoDB)
EF Core
Description:
I want to add custom claim to CurrentUser And I do as recommendation in bellow link:
#8073 (comment)
But when login error occurred:
An unhandled exception occurred while processing the request.
InvalidOperationException: only a single identity supported
IdentityServer4.Hosting.IdentityServerAuthenticationService.AssertRequiredClaims(ClaimsPrincipal principal)
Steps needed to reproduce the problem.
My demo project(I have changed the Index.cshtml to show the claims):
Acme.BookStore.zip
The text was updated successfully, but these errors were encountered: