I have the following code I modified from the original ASP.NET Core project template
builder.Services.AddDefaultIdentity<IdentityUser>(
options =>
{
options.Password.RequireDigit = true;
options.Password.RequiredLength = 8;
options.Password.RequireNonAlphanumeric = false;
options.Password.RequireLowercase = true;
options.Password.RequireUppercase = true;
}
)
.AddEntityFrameworkStores<ApplicationDbContext>();
But how do I make ASP.NET Core return an error for specific passwords?
Let's say I have an array of banned passwords like this:
var bannedPasswords = new[] {"password", "qwertyuiop", "12345678"};