Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Lockout in ASP.NET CORE not working

$
0
0

Hi guys,

I want to make Lockout for Users when some times of tries login, but it not work with me, i do not know why

That in my code in Startup class:

services.AddIdentity<AppUser, IdentityRole>(opts =>
            {
                // Lockout settings
                opts.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromMinutes(30);
                opts.Lockout.MaxFailedAccessAttempts = 3;
                opts.Lockout.AllowedForNewUsers = true;

            }).AddEntityFrameworkStores<MyDBContext>().AddDefaultTokenProviders()

and that is code in Account Controller:

signInManager.PasswordSignInAsync(User, password, IsPersist, true);

Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>