sepiariver / recaptchav2

Google's ReCaptcha V2 + V3 for MODX CMS: https://sepiariver.com/modx/recaptchav2-supports-recaptchav3/
https://sepiariver.com/
GNU General Public License v2.0
21 stars 15 forks source link

Invalid site key even though it is correct #41

Closed janwidmer closed 5 years ago

janwidmer commented 5 years ago

Hey There,

I installed ReCaptcha on another page. I am using ReCaptcha Version 3.0.1-rc1 and FormIt Version 4.2.1.

I created a new Google ReCaptcha Site and Secret Key and added it to the system settings. The captcha initialises but always tells me, that my Site Key is wrong.

The following code has been added to the content field of the page:

[[!FormIt?
    &hooks=`recaptchav2`
    &validate=`test:required`
]]

<form action="[[~[[*id]]]]" method="post" id="test-form">
    <label for="test">Test Field *</label>
    <input type="text" value="[[!+fi.test]]" name="test"  id="test" />
    [[!+fi.error.test]]

    [[!recaptchav2_render]]
    [[!+fi.error.recaptchav2_error]]

    <button type="submit">Submit Form</button>
</form>

I already tried the following things without any success:

I also tried to fiddle around with the two settings within google recaptcha admin: image

Weird enough, right after unchecking those checkboxes and saving, it works, but when navigating away from the site and coming back or checking another form on the page, it is sometimes again broken. Also checking those two options again right after still works..

It's quite random and I was not able to see any logic behind working or not working. It seems to be some kind of caching related thing.

Any Idea what could be the problem?

janwidmer commented 5 years ago

ok my bad, i had the domain added with https:// which seems to not be working