I submit this form using an ajaxSubmit, and it works fine.
I found a problem. Using postman i can simulate a user flooding with lots of requests.
We can replicate this doing a GET request to the page, then the attacket get the CSRF token and send multiple POST REQUESTS passing the email field and the csrf token.
How can i avoid this?
You have multiple options, below are some examples:
Rate limiting: limit the ip adress to call the post route for example only x amount of times every x minutes.
Implement Captcha on your form
Add honeypot field to your form, bots will fill all the fields in the form. This way you can detect invalid requests when this field is filled in. Spatie has a package for this if you prefer to use that: https://github.com/spatie/laravel-honeypot
@gych Thanks , i think the solution of using a captcha(recaptcha for example) could be the easyest one. Also the honeypot is really interesting. Thanks