.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

相關文章
相關標籤/搜索