Rohan

Rohan

  • NA
  • 1.4k
  • 117k

Account lookout after 5 attempts

Oct 26 2021 9:13 AM

Hello everyone how to lock out a user account after 5 attempts in .net core. I have set code in a startup.cs but not working.

services.AddIdentity<User, IdentityRole>(options =>
            {
                options.SignIn.RequireConfirmedAccount = true;
                options.SignIn.RequireConfirmedEmail = true;
                options.Lockout.AllowedForNewUsers = true;
                options.Lockout.MaxFailedAccessAttempts = 3;
                options.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromMinutes(10);            
            })


Answers (3)