Google reCAPTCHA updates

Hi all,

Like many I assume, I use Google reCAPTCHA with a lot of my CloudCannon forms. My older sites still use V2 and the newer ones use V3. For V3 I use JS code based on the CloudCannon docs.

A notification arrived recently from Google that I needed to start manually migrating keys from reCAPTCHA Classic (in the classic Admin Console) to a Google Cloud project. If I didn’t, Google would do it automatically at some later stage. It looks like no code needs to change on the website or server end to keep these legacy reCAPTCHAs going. I’m hoping that’s the case so I don’t have to make modifications across many sites at once.

From the Google documentation, to use the new version of the reCAPTCHA code, https://www.google.com/recaptcha/api.js is replaced with https://www.google.com/recaptcha/enterprise.js and the function calls are also updated:

  • grecaptcha.execute() → grecaptcha.enterprise.execute()

  • grecaptcha.getResponse() → grecaptcha.enterprise.getResponse()

  • grecaptcha.ready() → grecaptcha.enterprise.ready()

  • grecaptcha.render() → grecaptcha.enterprise.render()

  • grecaptcha.reset() → grecaptcha.enterprise.reset()

And in the server-side code: Replace backend calls to https://www.google.com/recaptcha/api/siteverify with equivalent calls to recaptchaenterprise.googleapis.com

I’m assuming that at the CloudCannon end there might now need to be two different options for incorporating Google reCAPTCHA into a form to handle the legacy and new versions?

2 Likes

Thanks for the heads up Viv, I personally hadn’t heard about this! We’ll definitely have a look into this soon, to see what we might need to do to support these new versions of reCAPTCHA. Keen to hear if anyone is already using these! :eyes:

Here’s a link to Google’s documentation about the reCAPTCHA migration, in case anyone wants to read more: reCAPTCHA migration overview  |  Google Cloud

3 Likes