hunostor

Identity Startup setup

Dec 8th, 2018
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. services.AddIdentity<IdentityUser, IdentityRole>(options => {
  2.                 options.Password.RequiredLength = 6;
  3.                 options.Password.RequireNonAlphanumeric = false;
  4.                 options.Password.RequireUppercase = false;
  5.                 options.User.RequireUniqueEmail = true;
  6.             })
  7.             .AddRoles<IdentityRole>()
  8.             .AddRoleManager<RoleManager<IdentityRole>>()
  9.             .AddDefaultUI()            
  10.             .AddDefaultTokenProviders()
  11.             .AddEntityFrameworkStores<ApplicationDbContext>();
Advertisement
Add Comment
Please, Sign In to add comment