Base solution for your next web application
Open Closed

Best approach to add new login failure type? #11546


User avatar
0
hra created

Hi there,

I'm using AspNetZero core 10 with angular.

I wish to add ip restricted authentication to the platform. I have tracked the necessary code location to the LogInManager.LoginAsyncInternal overloads. These methods allow me to capture the identify, then lookup the IP whitelist for that tenant, before making a decision as to whether login should continue or not.

However, I can see a hurdle to extending this functionality is the AbpLoginResultType enum. There is no generic failure mode (i.e) FailedForOtherReason - and I really do not want to return an 'invalid password' failure - I want the user to know that the service is not available from their IP.

What's the most suitable way to go about this which doesn't involve forking entire chunks of AspNetBoilerplate?

Thanks,


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @hra

    Could you create an issue on https://github.com/aspnetboilerplate/aspnetboilerplate ? We will implement this and release with the new version.

    Thanks,

  • User Avatar
    0
    hra created

    Thanks @ismcagdas,

    feature request created here: https://github.com/aspnetboilerplate/aspnetboilerplate/issues/6691