-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lockout event is never fired #336
Comments
Conclusion : Laravel framework 8.x request throttling feature prevents (basically interrupts the flow beforehand) the lockout event to be fired (which is already seemed to be a removed feature). If the lockout option is desired it could be implemented, but not a mere use of this event type. |
@alperyazgan - I understand this issue is old, but the Lockout Fortify own handler is still present but never reached due to the Laravel middleware. However, with simple steps, I was able to get it working back again. This to me seems like an existing bug. The Laravel middleware should be an option that we enable or not, but never the only option. Any support in my current issue is appreciated. |
What is aimed
Enable a configurable option for the app to use either the throttling or user lockout.
What is failing
Throttling is working fine but the lockout event is never fired so never fetched, lockout option could not be setup.
Description:
With 2 Different Case Scenarios, during Authentication (with same user, wrong password) lockout event is expected to be fired but never happened;
First Scenario:
config/fortify.php has the following limiters set
'limiters' => [ 'login' => 'login', 'two-factor' => 'two-factor', ],
And inside the boot method of "FortifyServiceProvider" we have authenticateUsing and authenticateThrough methods configured and the rate limiters.
In this scenario we can easily follow that login request goes thru
AuthenticatedSessionController::loginPipe
method and inside the method, first block is evaluated to be true and executed, so theEnsureLoginIsNotThrottled::handle
but after too many attempts we get 429 error and get to the relevant error-page but event is never fired.Second Scenario:
config/fortify.php has the following limiters set
'limiters' => [ 'login' => null, 'two-factor' => null, ],
And inside the boot method of "FortifyServiceProvider" we have only authenticateUsing method configured.
In this scenario we can easily follow that login request goes thru
AuthenticatedSessionController::loginPipe
method and third block is executed, so theEnsureLoginIsNotThrottled::handle
but after too many attempts we get 429 error and get to the relevant error-page but event again is never fired.Actually in both scenarios, during the too many attempt phase, EnsureLoginIsNotThrottled::handle could not find a chance to be executed, throttling control prevent it beforehand.
Maybe, my approach to the case is lacking, or missing something; therefore on this issue your assistance will be greatly appreciated.
Kind Regards,
The text was updated successfully, but these errors were encountered: