Ommadawn
Ommadawn

Reputation: 2730

Google reCaptcha v3 not ready when clicking submit

I'm migrating from reCaptchav2 to v3 and I've got some issues I don't know how to solve them.

I put the reCaptcha v3 in the login page, but if the users do login so fast, the captcha is not solved yet (Google has not send the response yet), so my page throws an error as if the captcha was not well solved (as if the user was a bot).

How could I solve this? In version 2, I could wait the checkbox of captcha was checked, but now there isn't a checkbox...

Thanks!

Upvotes: 3

Views: 2040

Answers (1)

Ommadawn
Ommadawn

Reputation: 2730

I found a solution. When I call the Google reCaptcha API, the submit button is disabled meanwhile. When I get the answer from Google, I enable the button so I can do submit. I do that cheching to a variable in javascript that will be true when the answer is ready. Hope this helps.

Upvotes: 4

Related Questions