Monday, September 5, 2016

Limiting Failed Login Attempts on Laravel 5.3

First... let's create a new fresh laravel 5.3...


Create new database config...I'm using xampp here... then do migration...
Next.. create new auth :

After that.... Let's run our laravel and register a new user....
After registering new user, we will automatically log in... So log out first......Then Login at the top right... After that you will be directed to login page... aaand... try to log in with wrong password or wrong email... For laravel 5.3 maksimum login attempt is 5 with locking period 60 seconds

If we want to change this number to 3 with different lockin period, we just have to change the value on ThrottlesLogins.php as shown below :

Then let's try again....

Sooow... The failed login attemp become 3 with locking period 180 seconds... ehehe... Coool... B-)


That's all... ;)


Demo :

No comments:

Post a Comment