appleboy / react-recaptcha

A react.js reCAPTCHA for Google
https://www.google.com/recaptcha/intro/index.html
BSD 3-Clause "New" or "Revised" License
635 stars 97 forks source link

recaptcha does not trigger post page reload #249

Open jasan-s opened 6 years ago

jasan-s commented 6 years ago

recaptcha works as expected on the first load of a component, however, If I reload the page and then try this.recaptchaInstance.execute() nothing happens

markpradhan commented 6 years ago

Had the same issue, moved to react-google-recaptcha which has very similar api. Problem solved.

shawngavin commented 5 years ago

Try removing the explicit render argument or changing it to the default onload. i.e.

From Google's Recaptcha docs.

render explicit onload Optional. Whether to render the widget explicitly. Defaults to onload, which will render the widget in the first g-recaptcha tag it finds.
montanaflynn commented 4 years ago

Same issue for me when using invisible recaptcha v2, switching to the checkbox works after using recaptchaInstance.reset();