diff options
Diffstat (limited to 'Program.cs')
-rw-r--r-- | Program.cs | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -17,6 +17,13 @@ builder.Services.AddDbContext<IdentityContext>(opts => builder.Services.AddIdentity<IdentityUser, IdentityRole>() .AddEntityFrameworkStores<IdentityContext>(); + +builder.Services.Configure<IdentityOptions>( opts => +{ + opts.Password.RequiredLength = 6; + opts.Password.RequireNonAlphanumeric = false; + opts.User.AllowedUserNameCharacters = "abcdefghijklmnopqrstuvwxyz"; +}); builder.Services.AddControllersWithViews(); @@ -28,5 +35,6 @@ app.MapDefaultControllerRoute(); app.UseAuthentication(); app.UseAuthorization(); +IdentitySeedData.CreateAdminAccount(app.Services, app.Configuration); app.Run();
\ No newline at end of file |