Here is my setup:
public class ApplicationUser : IdentityUser
{
}
public class ApplicationRole : IdentityRole
{
}
public class Applic
I came up with this:
// Extract IApplicationUserManager interface with all methods you are using
public class ApplicationUserManager : UserManager, IApplicationUserManager
// Register your custom user manager
services.AddIdentity()
.AddUserManager();
// Return same scoped instance whenever you injecting your custom user manager into any constructor
services.AddScoped(s => s.GetService());