Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to protect the Laravel API from brute-force?

I have a database with a user table that is on the server and a graphical application that is on the user’s computer. Authorization needs to be done.

Obviously, you cannot access the database directly from the application, you need to write an API (for this I use Laravel). I’m going to send the entered username and password from the application to the API and receive a response about the correctness of the entered data

But in this case, how to limit the number of requests with an incorrect password to protect yourself from brute-force?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Laravel includes a simple to use rate limiting abstraction which, in
conjunction with your application’s cache, provides an easy way to
limit any action during a specified window of time.

https://laravel.com/docs/9.x/rate-limiting

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading