diff --git a/components/operador/Login.vue b/components/operador/Login.vue index ca074dd..530d9bf 100644 --- a/components/operador/Login.vue +++ b/components/operador/Login.vue @@ -82,8 +82,11 @@ export default { } }, methods: { - login() { - if (this.usuario && this.password && !this.error) { + async login() { + const token = await this.$recaptcha.getResponse() + console.log('ReCaptcha token:', token) + + if (this.usuario && this.password && !this.error && !token) { const data = { operador: this.usuario, password: this.password, @@ -172,6 +175,9 @@ export default { created() { this.obtenerCatalogoInstitucion() }, + beforeDestroy() { + this.$recaptcha.destroy() +} }