Implementing reCAPTCHA V3 and reCAPTCHA V2 (Invisible and Checkbox) for Laravel Project

Cerwyn Cahyono
The Startup
Published in
11 min readMay 31, 2020

--

Photo by מתן שגב from Pexels

What do you know about reCaptcha? I mean, every developer would understand why we use reCaptcha on our websites. It protects our sites from the bot and ensures that only humans can be in our sites. From Google’s documentation, it has a very explicit explanation:

reCAPTCHA protects you against spam and other types of automated abuse. -developers.google.com

Usually, we use this reCaptcha on our login/register page or a form that we want to protect. But actually, we can extend this usability in every button/action we want to protect. In reCaptcha version 3, we can get a score and can determine the threshold by ourselves. Then, we can do whatever we like when somebody/something below the threshold we defined. Pretty impressive, right?

Right now, Google has two versions of reCapthca; version 2 and version 3. In version 2, we can get three types of reCaptcha for checkbox, invisible, and Android. Fortunately, implementing them isn’t a difficult job. Google has made this very easy for us. So in this post, I’ll show you how to implement reCaptcha version 2 (Checkbox and Invisible) and reCaptcha version 3 in a Laravel project, and give you the comparison between these versions and what version…

--

--

Cerwyn Cahyono
The Startup

PHP/Backend Engineer at Undercurrent Capital Pte Ltd — Data Science Enthusiast