grav-plugin-form icon indicating copy to clipboard operation
grav-plugin-form copied to clipboard

Modify Captcha v3 threshold in config

Open kibkib opened this issue 1 year ago • 0 comments

As I often get 'score-threshold-not-met' captcha error for my form, it would be nice to have an option to modify the threshold in the form config

There is a fixed value of 0.5 in the form.php

... // Add version 3 specific options if ($captcha_version == 3) { $token = $form->value('token'); $resp = $recaptcha ->setExpectedHostname($hostname) ->setExpectedAction($action) ->setScoreThreshold(0.5) ->verify($token, $ip); } else {

kibkib avatar Oct 17 '24 10:10 kibkib