I've successfully implemented this on my page.. When the user clicks submit I want it to check the captcha...
I have this...
async recaptcha() {
await this.$recaptchaLoaded()
const token = await this.$recaptcha('login')
// Do stuff with the received token.
},
Is the await this.$recaptcha('login') referring to some example? Or is that simple line of code checking that the user is human, and then I can go ahead and submit the form after // Do stuff with the received token? As I don't have any forms or functions on my page called "login"?
Hi! The first argument of the $recaptcha function is the reCAPTCHA action name. See here. You can use any name you'd like, 'login' is just an example. :)
The token returned by the function can then be used on the backend for validation.
Hi there
I've successfully implemented this on my page.. When the user clicks submit I want it to check the captcha...
I have this...
Is the await this.$recaptcha('login') referring to some example? Or is that simple line of code checking that the user is human, and then I can go ahead and submit the form after // Do stuff with the received token? As I don't have any forms or functions on my page called "login"?
I hope that makes sense!