UndefinedOffset / silverstripe-nocaptcha

A spam protector and form field using Google's reCAPTCHA v2 or optionally a foundation v3 implementation
BSD 3-Clause "New" or "Revised" License
31 stars 37 forks source link

g-recaptcha-response not set for iOS #59

Open djmattski opened 4 years ago

djmattski commented 4 years ago

Have an issue that seems to be only for iOS where the error of :

UndefinedOffset\NoCaptcha\Forms\NocaptchaField.EMPTY : Please answer the captcha, if you do not see the captcha you must enable JavaScript

is kicking in. This is using NoCaptcha out of the box in a SS4 set up with UserDefined Forms. The ReCaptcha account is set up for invisible V2 as is the configuration in yml.

It may be that there is something peculiar to our code - but wondering if you are able to replicate. Cheers

UndefinedOffset commented 4 years ago

Which version of Silverstripe and User Defined forms are you using?

djmattski commented 4 years ago

Sorry should have said. Version 2.0.5 of this module Version 4.5.3 Silverstripe Version 5.5.2 Userforms

jesscoreed commented 2 years ago

We are also having this issue, however not just on iOS, the g-recaptcha-response is empty every time. Wondering if you ever found a solution for this @djmattski?

djmattski commented 2 years ago

Hey @jesscoreed ... this feels like an age ago. I think we did resolve this one (apologies should have mentioned on this issue when we did).

If I recall I think it came down to a CSP thing for us, as it was really only iOS in our case. Turns out that Safari does not respect a script-src in the CSP and so ReCaptcha was being blocked. We had to add it in twice, once to the default-src and again to the script-src. You will still get a warning in Safari that it does not recognize script-src but that is for them to catch up with the rest of the field.