Google Recaptcha - Expires After 2 Minutes - Form Cannot Be Submitted - Question | JoomShaper

Google Recaptcha - Expires After 2 Minutes - Form Cannot Be Submitted

PW

Paddy Wanless

SP Page Builder 6 days ago

Hi,

I have successfully set up a page in SP Page Builder Pro which contains a contact form.

This form successfully uses Invisitible Recaptcha v2 and everything looks to work really well.

However, if a person filling out the form takes longer than 2 minutes to fill out the form, they are unable to submit it because it states Invalid Recaptcha.

This is because the Recaptcha token has expired due to 2 minutes passing from the page loading to the form being submitted.

This can easily be tested on any form from SP Page Builder Pro with Recaptcha:

  • Visit the page, quickly fill out the form, submit it - it works!
  • Visit the same page - wait more than two minutes - fill out the form, submit it - it fails!

Do you know how this can this be resolved?

Thanks for any assistance, Paddy

0
4 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 6 days ago #213698

Hi Paddy,

The short answer is no, you cannot change the 2-minute expiration limit in the Google reCAPTCHA settings. This limit is a security feature enforced by Google to prevent "replay attacks," where a bot might try to reuse an old, successful token to bypass security. If the user waits 3 minutes to hit "Submit" after the token was generated, your server will receive a timeout-or-duplicate error.


Consider using Cloudflare Turnstile Captcha (5 minutes session) , or remove recaptcha if your form is too long for typical spam bots. Guide: https://www.joomshaper.com/documentation/sp-page-builder/configuring-cloudflare-turnstile-captcha

0
PW
Paddy Wanless
Accepted Answer
6 days ago #213699

Hi Paul,

Thanks for the response.

I was hoping that there was a way to make use of the 'expired-callback' functionality within Google reCaptcha. I can see that this can be configured within the Joomla Plugin. But I'm not sure how to utilise this functionality with the SP Page Builder Pro page.

If you have any information regarding this functionality that I believe would fix the problem then that would be really helpful!

In the meantime, I'll take a look at the Cloudflare solution and look to see what's involved with that.

I'll update this with my findings.

Thanks again, Paddy

0
PW
Paddy Wanless
Accepted Answer
6 days ago #213723

Just a quick update...

The Cloudflare Turnstile Captcha was very very easy to set-up and install and worked flawlessly.

This will be our standard Captcha solution instead of Google ReCaptcha.

Thanks for the info Paul, really appreciated!

Paddy

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 6 days ago #213728

You're welcome. Please mark topic as solved.

0