dimanche 24 septembre 2017 à 17:00

ReCaptcha

Par Eric Antoine Scuccimarra

I just added a Captcha to the registration and contact me pages due to large amounts of spam mail and what seem to be fake registrations. Luckily Google's ReCaptcha is easy to use.

To integrate with Laravel I used greggilbet/recaptcha which I have used for other projects and which is amazingly easy to use. If anyone needs a Captcha I highly recommend it.

It does get annoying when you are asked to keep clicking on images instead of just typing in numbers, but that only happens if you continually try to submit the same form, which means that it's working. To avoid the endless clicking in development I usually add the rule to the validation conditionally based on the env('APP_ENV') variable so that it is only added in production.

Libellés: coding, spam


Commentaires

Connectez-vous ou Inscrivez-vous pour enregistrer un commentaire..


Archives du Blogue