I am using ClaimsIdentityFactory() . Here is my code:
public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager, string AuthenticationType) { var factory = new ClaimsIdentityFactory<ApplicationUser>(); return await factory.CreateAsync(manager, this, AuthenticationType); }
source share