A simple website to test basic reCAPTCHA v2 functionality with callbacks.
To handle possible reCAPTCHA v2 events, override one or more of the following in index.html:
// fired, when the reCAPTCHA is loaded (onload URL parameter)
function onCaptchaLoad() {
console.log('onCaptchaLoad')
}
// fired, when the user submits a successful reCAPTCHA response (data-callback attribute)
function onCaptchaSuccess(token) {
console.log('onCaptchaSuccess', token)
}
// fired, when the reCAPTCHA response expires and the user needs to re-verify (data-expired-callback attribute)
function onCaptchaExpired() {
console.log('onCaptchaExpired')
}
// fired, when the reCAPTCHA encounters an error (data-error-callback attribute)
function onCaptchaError() {
console.log('onCaptchaError')
}
Any contribution is highly appreciated. Thank you in advance and have fun!