Take the community feedback survey now.
Take the community feedback survey now.
Hi Peter, I'll try to give answers that might help you or at least lead you in right direction:
1) If your user model should contain additional properties, you need to extended ApplicationUser model with your own, but you'll also need to write a custom ApplicationUserManager that knows how to deal with those additional tables and user data, also EF migration is needed for additional user properties. Are those custom tables added using Entity Framework, do you have migrations in project?
2) You can investigate following classes and possibly extend them or replace with custom one: ApplicationUserProvider, ApplicationUserManager, ApplicationRoleProvider, ApplicationRoleManager.
3) If you want to use standard tables your are stuck with properties that are default by Identity server, but as I can see, you need additional user data and that means you'll need to implement your custom classes that extend those built-in properties and implementation.
You can also use virtual (NotMapped) properties as part of ApplicationUser model where those additional properties are only getters for data coming from Azure Entra that are resolved in the runtime, so they don't need to be stored in Optimizely DB at all.
We are currently upgrading an episerver 11 site to 12 for a customer. The current site uses Entra for login (OpenId) and custom tables for users, roles and userrole mappings. To manage the custom tables there are custom MembershipProvider and RoleProvider classes and quite a bit of custom code.
We are trying to find the best way to migrate to using AspNetIdentity instead, so we have some questions:
Thanks, Peter