Support the ongoing development of Laravel.io →
Authentication Requests Validation
Last updated 3 months 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 5 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!

LaraJobs

Your banner here too?

Moderators

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

Your logo here?

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

© 2022 Laravel.io - All rights reserved.