Skip to content

Instantly share code, notes, and snippets.

@cp-sumi-k
Last active October 5, 2022 06:16
Show Gist options
  • Save cp-sumi-k/14cece124d3bc1b1f1cd5f8a58f8fbf7 to your computer and use it in GitHub Desktop.
Save cp-sumi-k/14cece124d3bc1b1f1cd5f8a58f8fbf7 to your computer and use it in GitHub Desktop.
grecaptcha.enterprise.ready(() => {
grecaptcha.enterprise
.execute(import.meta.env.VITE_RECAPTCHA_SITE_KEY, {
action: "verify",
})
.then(function (token) {
/** append token with formData and send it to backend API */
})
.catch(() => {
/** invalid reCaptcha score */
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment