Skip to content

Create an account ReCaptcha issue on Magento 2.4.5

I’m using the create an account GraphQL, sometimes the validation passed and a few times it doesn’t. It seems to be an issue from these validation part of the code:

if ($reCaptchaConfig
            && !$this->validator->isValid(
                (string)$this->request->getHeader('X-ReCaptcha'),
                $reCaptchaConfig
            )->isValid()
        ) {
            throw new GraphQlInputException(__('ReCaptcha validation failed, please try again'));
        }

from vendor/magento/module-re-captcha-webapi-graph-ql/Plugin/GraphQlValidator.php.

This is what I got from my system error logs:

report.ERROR: ReCaptcha validation failed, please try again

report.ERROR: ReCaptcha validation failed, please try again

How could I find this intermittent issue?