Добавил настройки для пароля

parent 4deba23b
using Microsoft.AspNetCore.Identity;
using Store.Extensions; using Store.Extensions;
using Store.Models;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
var services = builder.Services; var services = builder.Services;
...@@ -9,6 +11,17 @@ services.AddControllersWithViews(); ...@@ -9,6 +11,17 @@ services.AddControllersWithViews();
services.AddAppServices(configuration); services.AddAppServices(configuration);
services.Configure<IdentityOptions>(options =>
{
// Default Password settings.
options.Password.RequireDigit = true;
options.Password.RequireLowercase = true;
options.Password.RequireNonAlphanumeric = true;
options.Password.RequireUppercase = true;
options.Password.RequiredLength = 6;
options.Password.RequiredUniqueChars = 1;
});
var app = builder.Build(); var app = builder.Build();
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment