Google Recaptcha - Expires after 2 minutes - Form cannot be submitted - Forum | JoomShaper
Solved SP Page Builder

Google Recaptcha - Expires after 2 minutes - Form cannot be submitted

Asked by Paddy Wanless 10 months ago Last activity 10 months 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

Accepted answer

Marked as the solution
Paul Frankowski Senior Staff
10 months ago · edited

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

3 more replies

Paddy Wanless Asked this

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

Paddy Wanless Asked this

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

Paul Frankowski Senior Staff

You're welcome. Please mark topic as solved.

Log in to reply.