Answer the question
In order to leave comments, you need to log in
Where to read what has changed in asp.net core 2.1?
Good evening!
With every update of .net, it's like I'm starting to learn all this infrastructure all over again. Downloaded the latest sdk for .net core 2.1, created an mvc project, wanted to change the minimum password length, remove numbers... and just couldn't find it in the project. Previously, I just went to f12 by IdentityUser and set what I needed. Now I climb into the tutorials and advise this
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
services.AddIdentity<ApplicationUser, IdentityRole>(opts=> {
opts.Password.RequiredLength = 5; // минимальная длина
opts.Password.RequireNonAlphanumeric = false; // требуются ли не алфавитно-цифровые символы
opts.Password.RequireLowercase = false; // требуются ли символы в нижнем регистре
opts.Password.RequireUppercase = false; // требуются ли символы в верхнем регистре
opts.Password.RequireDigit = false; // требуются ли цифры
})
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
Answer the question
In order to leave comments, you need to log in
1 - https://blogs.msdn.microsoft.com/webdev/2018/05/30...
2 - https://docs.microsoft.com/en-us/aspnet/core/relea...
in Russian
3 - andrey.moveax.ru/post/news-2018-05-31-dot-net-core
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question