aryehraber / statamic-captcha

Statamic Addon that protects your Statamic forms using a Captcha service.
MIT License
11 stars 8 forks source link

Google recaptcha - option threshold in config #48

Open miloslavkostir opened 1 year ago

aryehraber commented 1 year ago

Hi @miloslavkostir, thanks for the PR!

What exactly is the threshold config for? I was under the impression this was introduced to reCAPTCHA V3 (which Statamic Captcha does not support).

miloslavkostir commented 1 year ago

OK, I overlooked information about not support reCAPTCHA v3.

I use this with v3 anyway - it works. If you use v3 keys (sitekey & secret key) you get score in response. Then you can compare it with threshold in config.

So, you can implement support v3 and use my solution or close this PR. In my web I extend Recaptcha class - it is functional as well.

aryehraber commented 1 year ago

No problem, I appreciate the PR anyways. And interesting to know that the addon works with only minor changes for reCAPTCHA v3.

I'm completely open to supporting it, it would make Statamic Captcha more well rounded too. My issue with reCAPTCHA v3 is as follows (and I'm hoping you can perhaps shed some light on it for me):

I implemented reCAPTCHA v3 on a client site a few years ago, thinking it was basically just an upgrade of v2. What ended up happening, however, was that we noticed real users were also getting blocked, for some reason Google was returning a low score for a % of actual customers/leads. And unlike reCAPTCHA v2, there is no way for a user to "redeem" themselves by solving a captcha/puzzle, they simply can't continue at all and therefore could not submit forms.

Since I don't want to over complicate Statamic Captcha to handle these types of cases, I've been hesitant to support v3.

What has your experience been? What do you do in the above scenario?