Support the ongoing development of Laravel.io →
Authentication Requests Validation
Last updated 1 year ago.
0

If you use default login feature, just add this method to your App\User

protected function hasTooManyLoginAttempts(Request $request)
{
    $maxLoginAttempts = 3;
 
    $lockoutTime = 1; // In minutes
 
    return $this->limiter()->tooManyAttempts(
        $this->throttleKey($request), $maxLoginAttempts, $lockoutTime
    );
}

Reference: https://mul14.wordpress.com/2016/12/25/mengatur-maximum-login-...

Last updated 7 years ago.
0

mul14 said:

If you use default login feature, just add this method to your App\User

protected function hasTooManyLoginAttempts(Request $request)
{
   $maxLoginAttempts = 3;

   $lockoutTime = 1; // In minutes

   return $this->limiter()->tooManyAttempts(
       $this->throttleKey($request), $maxLoginAttempts, $lockoutTime
   );
}

Reference: https://mul14.wordpress.com/2016/12/25/mengatur-maximum-login-...

You have to add this method to Auth\LoginController.php in Laravel 5.3

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.