Recaptcha V3 returns BROWSER_ERROR and v2 null token

216 views Asked by At

A few days ago, reCAPTCHA was functioning correctly on my site. However, currently, I'm encountering issues with it.

I attempted using v2 with the invisible option, but when I call grecaptcha.execute(), no callback function is triggered, and the returned token is null. Additionally, there is no request sent as XHR in the Network tab.

For v3, here is my code: `

<script>
    function onClick(){
       grecaptcha.ready(function() {
          grecaptcha.execute('SITE_KEY', {action: 'submit'}).then(function(token) {
            console.log('validate:'+token);
            sendform(token)             
          });
        });
    } 
</script>

This code runs when a button is clicked. The token is received, but when I try to verify it on the server side, I encounter the error "browser-error."

I'm puzzled as to why v2 isn't triggering any callback function and why the token is null. Similarly, I'm curious about the "browser-error" returned by v3. Any insights into these issues would be greatly appreciated.

0

There are 0 answers