Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
The first implementation option for the article: https://kolmogorov.pro/integration_google_recaptcha_v3_in_site_on_vue_js
<script src="https://www.google.com/recaptcha/api.js?render=ВАШ_КЛЮЧ"></script>
<script>
grecaptcha.ready(function() {
grecaptcha.execute('ВАШ_КЛЮЧ', {action: 'homepage'}).then(function(token) {
let json = JSON.stringify({
token: token
});
let xhr = new XMLHttpRequest();
xhr.open('POST', '/functions/recaptcha.php', false);
xhr.send(json);
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.