Answer the question
In order to leave comments, you need to log in
How to update reCaptcha v3 Token?
There is a login form, standard fields (login, password) and set recaptcha v3. Everything works, but if a person entered the login and password incorrectly, then the token (reCaptcha) does not change, and as a result, an error occurs on the second request.
The login request is made via ajax.
grecaptcha.ready(function () {
grecaptcha.execute('6LeK7**********660SKbB0U-m0*************', { action: 'login' }).then(function (token) {
var recaptchaResponse = document.getElementById('recaptchaResponse');
recaptchaResponse.value = token;
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question