Google reCaptcha saves download forever

I am using Google reCaptcha 2.0 on my website. It worked well, but since I opened my site to the public and got a few more users, recaptcha no longer works with most users. It loads normally, but as soon as the user clicks the "I'm not a robot" checkbox, he always saves the download and never returns a confirmation.

I tried to look around the world, but could not find someone with a similar problem, and I have no idea how (or, if possible) to debug it, because, apparently, it does not return a response from Google, All my keys true.

Can someone help me? My site is www.heropanel.com - to simulate it, click on the contact at the bottom of the page and click "I'm not a robot."

+4
source share
3 answers

I actually found the answer. CAPTCHA was loaded inside a modal popup. When this pop-up window loads, it will change the parent div and something will break the captcha (maybe some kind of built-in security code). My solution was to reload the captcha after the popup.

+2
source

Your problem:

<div class="g-recaptcha" data-theme="light"></div>

You do not have an attribute. the correct one will be:

<script src='https://www.google.com/recaptcha/api.js'></script>
<div class="g-recaptcha" data-sitekey="your_google_public_key"></div>

Before using google captcha, create a data-sitekey .

https://developers.google.com/recaptcha/docs/display https://www.google.com/recaptcha/admin#createsite

+3

. reCaptcha, . , , reCaptcha, . , , bool length = false, . .

  • reset reCaptcha, 'grecaptcha.reset();'.

  • , - ( ) script.

0

Source: https://habr.com/ru/post/1614772/


All Articles