Question about users enabled property
Hello Hello. I am looking for help. I am configuring an identityserver4 with skoruba like as documentaction say and everithing works fine. The administrations functionalities are excellent. No, i want to introduce a little change. On the login process i want to check if user is enabled or not according to a custom field of users table. How can I do that? I want something like https://deblokt.com/2020/01/24/05-identityserver4-adding-custom-properties-to-user-net-core-3-1/ I can add that properties to entity framework.Shared.Entities.Identity and the in the post login how can I access to that properties? The user returned by _userResolver.GetUserAsync don't have it. Greetings
Hi @yorlen88 - please check dev branch - I added base dtos into shared project. In next RC2 - it will be possible to use these base objects. You need probable add custom property called Enabled into:
IdentityUserDto.cs(https://github.com/skoruba/IdentityServer4.Admin/blob/dev/src/Skoruba.IdentityServer4.Shared/Dtos/Identity/IdentityUserDto.cs) andIdentityUser.cs(https://github.com/skoruba/IdentityServer4.Admin/blob/dev/src/Skoruba.IdentityServer4.Admin.EntityFramework.Shared/Entities/Identity/UserIdentity.cs).- automapper will mapped these properties automatically for you. I want to add some better explanation into docs. I apologize for current docs - I will improve it. :-)