In this topic the 2.x version configures everything on the options parameter of services.Configure<IdentityOptions>(options =>, however the 2.x version in Introduction to Identity uses the options parameter of services.AddIdentity<ApplicationUser, IdentityRole>(options => which I suspect is the convention going forward. Does this need to be updated? Is there a reason to use one vs the other?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@user135711 For ASP.NET Core 2.1, this is what the templates generate:
services.AddDefaultIdentity<IdentityUser>()
You're right, both topics need to be updated for 2.0 and 2.1.
The 2.0 templates generate
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
@Rick-Anderson For clarification I'm talking about the options passed into the arrow method, not the generic parameters. There are two versions where the long list of settings are made like
options.Password.RequireDigit = true;
options.Lockout.AllowedForNewUsers = true;
(basically everything except for cookies which moved to services.ConfigureApplicationCookie()
In one version, everything happens in services.Configure<IdentityOptions>(options => and in another option settings are set in services.AddIdentity<ApplicationUser, IdentityRole>(options =>. If one is on track to be deprecated, it needs to be documented.
Most helpful comment
@Rick-Anderson For clarification I'm talking about the options passed into the arrow method, not the generic parameters. There are two versions where the long list of settings are made like
options.Password.RequireDigit = true;
options.Lockout.AllowedForNewUsers = true;
(basically everything except for cookies which moved to
services.ConfigureApplicationCookie()In one version, everything happens in
services.Configure<IdentityOptions>(options =>and in another option settings are set inservices.AddIdentity<ApplicationUser, IdentityRole>(options =>. If one is on track to be deprecated, it needs to be documented.