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.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38