.net core Identity注册用户 出错

使用微软自带的注册 报 NotSupportedException: No IUserTwoFactorTokenProvider<TUser> named 'Default' is registered.ide

是由于startup缺乏配置文件ui

注册下面蓝色背景服务spa

services.AddIdentity<ApplicationUser, IdentityRole>(options =>
{
options.Password.RequireNonAlphanumeric = false;
options.Password.RequiredLength = 1;
options.Password.RequireLowercase = false;
options.Password.RequireUppercase = false;
})
.AddDefaultUI(UIFramework.Bootstrap4)
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();it

相关文章
相关标签/搜索