Vue reCAPTCHA-v3
A simple and easy to use reCAPTCHA (v3 only) library for Vue based on reCAPTCHA-v3.
Install
With NPM:
$ npm install vue-recaptcha-v3
With Yarn:
$ yarn add vue-recaptcha-v3
Prerequisites
To use this package you only need a valid site key for your domain, which you can easily get here.
Usage
import Vue from 'vue'
import { VueReCaptcha } from 'vue-recaptcha-v3'
vue.use(VueReCaptcha, { siteKey: '<site key>' })
new Vue({
methods: {
recaptcha() {
this.$recaptcha('login').then((token) => {
console.log(token)
})
}
},
template: '<button @click="recaptcha">Execute recaptcha</button>'
})