Open Closed

Configure All Users Created To Have LockoutEnabled as false #2768


User avatar
0
otee@urvin.finance created

I added this line of code in PreConfigureServices section of AuthServer

PreConfigure<IdentityOptions>(builder =>
{
builder.Lockout = new LockoutOptions
{
AllowedForNewUsers = Convert.ToBoolean(configuration.GetSection("UserLockOutOptions:AllowedForNewUsers").Value),
MaxFailedAccessAttempts = Convert.ToInt32(configuration.GetSection("UserLockOutOptions:MaxFailedAccessAttempts").Value),
};
});

It should set LockoutEnabled to false for new users but this still remains true. I also tried same in PostConfigureServices and ConfigureServices

I read this suggestion here https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4029 one of the suggestions is similar to my implementation. The second one is using AbpZero . I might need a license for it and not sure it will work.


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You should change the settings.

    image.png

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 13, 2025, 04:08