I'm using https://github.com/skoruba/IdentityServer4.Admin repository for my project.
I created ViewModel class (public class CreateDateViewModel : IdentityUser) for some custom fields (CreateDate) and inherited it from IdentityUser. After migration (Add-Migration "MigrationName" -Context IdentityServerConfigurationDbContext -o Migrations/IdentityServerConfiguration) and update the database, the field appeared in the database, but the Account controller still can't access the user.CreateDate property (var user = await _userManager.GetUserAsync(model.UserName); user.CreateDate is missing)
Can you suggest what to do?
After some time I got the answer and since there are no comments here I decided to answer it for myself. If someone faces the same issue, know that it's better to put this information into claims instead of creating new columns in DB. So, there is OpenIDProfile.cs, AddressClaimConstants, and OpenidClaimsHelpers.cs files you need to modify and add your own user claims. Then you need to call method updateuserclaims - synchronize existing and new claims then store them into UserClaims.
anywhere in your controller, you can get these claims:
you can find more here https://github.com/skoruba/IdentityServer4.Admin/issues/308