lundi 1 juin 2020

Why reCAPTCHA doesnt work in actual Chrome?

I was developing a site on a local server (Open Server) with a built-in Google Chrome browser version 68.0.3440.106. Captcha v2 is connected to forms, but on more modern versions of the same browser I get the error Uncaught (in promise) null on anchor: 1. I don’t understand what the problem is, and how to solve it.

Here is my code:

   "use strict";
    var idCaptcha1;
var onloadReCaptchaInvisible = function () {
    try {
        //login
        idCaptcha1 = grecaptcha.render('recaptcha1', {
            "sitekey": "mycaptchakey",
            "callback": "onSubmitReCaptcha1",
            "size": "invisible"
        });
    } catch (e) {
        //nothing
    }
}

function onSubmitReCaptcha1(token) {
    sendForm('signin', idCaptcha1);
}


So its working fine in old browser, when I want to send ajax form, it trigger captcha and user can work with it. What I did wrong? Except didnt update browser of local server of course ><




Aucun commentaire:

Enregistrer un commentaire