nuxt-community / recaptcha-module

🤖 Simple and easy Google reCAPTCHA integration with Nuxt.js
MIT License
253 stars 63 forks source link

How to actually use the captcha on a page? #42

Closed cipiasentini closed 3 years ago

cipiasentini commented 4 years ago

Documentation is great for setting up, but how do I actually use the recaptcha on a given page? After seting it up, I'm intercepting the request params but there's no captcha params at all.

cipiasentini commented 4 years ago

I think I've figured it out, I've just included the recaptcha component inside the component I wanted to use. Now I'm getting a key validation error on page load. Even though I've made sure to have the correct public key setted up (and the private one on the server). error image config image

elise-boinnot commented 4 years ago

Examples for v2 and v3 are here https://github.com/nuxt-community/recaptcha-module/tree/master/example

ramesh-maharjan commented 4 years ago

const token = await this.$recaptcha.execute('login') what's the login that we are passing? if you look at the example v3 its not referring to anything

irving-caamal commented 4 years ago

I think I've figured it out, I've just included the recaptcha component inside the component I wanted to use. Now I'm getting a key validation error on page load. Even though I've made sure to have the correct public key setted up (and the private one on the server). error image config image

did you solve this?

eliseboinnot commented 4 years ago

const token = await this.$recaptcha.execute('login') what's the login that we are passing?

“login” is just a name for the action the recaptcha is associated with. It can be anything. It will appear on the dashboard, more info here