All Projects → nuxt-community → Recaptcha Module

nuxt-community / Recaptcha Module

Licence: mit
🤖 Simple and easy Google reCAPTCHA integration with Nuxt.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Recaptcha Module

recaptcha
An easy-to-use reCAPTCHA package
Stars: ✭ 55 (-61.54%)
Mutual labels:  recaptcha, captcha
Recaptcha
reCAPTCHA = REcognize CAPTCHA: A Burp Suite Extender that recognize CAPTCHA and use for intruder payload 自动识别图形验证码并用于burp intruder爆破模块的插件
Stars: ✭ 596 (+316.78%)
Mutual labels:  captcha, recaptcha
recaptcha-2-phpbbmod
reCAPTCHA v2 for phpBB Olympus 3.0
Stars: ✭ 14 (-90.21%)
Mutual labels:  recaptcha, captcha
wagtail-django-recaptcha
A simple recaptcha field for Wagtail Form Pages
Stars: ✭ 47 (-67.13%)
Mutual labels:  recaptcha, captcha
Python Anticaptcha
Client library for solve captchas with Anticaptcha.com support.
Stars: ✭ 137 (-4.2%)
Mutual labels:  captcha, recaptcha
2captcha-python
Python 3 package for easy integration with the API of 2captcha captcha solving service to bypass recaptcha, hcaptcha, funcaptcha, geetest and solve any other captchas.
Stars: ✭ 140 (-2.1%)
Mutual labels:  recaptcha, captcha
Angular Recaptcha
AngularJS directive to add a reCaptcha widget to your form
Stars: ✭ 502 (+251.05%)
Mutual labels:  captcha, recaptcha
captcha-solver
Library and CLI for automating captcha verification across multiple providers.
Stars: ✭ 101 (-29.37%)
Mutual labels:  recaptcha, captcha
Hooman
http interceptor to hoomanize cloudflare requests
Stars: ✭ 82 (-42.66%)
Mutual labels:  captcha, recaptcha
Beelabrecaptcha2bundle
💻 Symfony bundle for Google Recaptcha2
Stars: ✭ 47 (-67.13%)
Mutual labels:  captcha, recaptcha
2captcha-go
Golang Module for easy integration with the API of 2captcha captcha solving service to bypass recaptcha, hcaptcha, funcaptcha, geetest and solve any other captchas.
Stars: ✭ 31 (-78.32%)
Mutual labels:  recaptcha, captcha
Express Recaptcha
Implementation of google recaptcha v2 & V3 solutions for express.js
Stars: ✭ 104 (-27.27%)
Mutual labels:  captcha, recaptcha
Captcha-Tools
All-in-one Python (And now Go!) module to help solve captchas with Capmonster, 2captcha and Anticaptcha API's!
Stars: ✭ 23 (-83.92%)
Mutual labels:  recaptcha, captcha
2captcha-php
PHP package for easy integration with the API of 2captcha captcha solving service to bypass recaptcha, hcaptcha, funcaptcha, geetest and solve any other captchas.
Stars: ✭ 25 (-82.52%)
Mutual labels:  recaptcha, captcha
opensea automatic uploader
(Bypass reCAPTCHAs) A Selenium Python bot to automatically and bulky upload and list your NFTs on OpenSea (all metadata integrated - Ethereum and Polygon supported); reCAPTCHA solver & bypasser included.
Stars: ✭ 205 (+43.36%)
Mutual labels:  recaptcha, captcha
Buster
Captcha solver extension for humans
Stars: ✭ 4,244 (+2867.83%)
Mutual labels:  captcha, recaptcha
CapMonsterCloud
a C# wrapper for CapMonster Cloud API
Stars: ✭ 17 (-88.11%)
Mutual labels:  recaptcha, captcha
Server-Captcha
Protect Your Server From Automated Bots With Captcha Now !
Stars: ✭ 18 (-87.41%)
Mutual labels:  recaptcha, captcha
Rucaptcha
Captcha gem for Rails Application. No dependencies. No ImageMagick, No RMagick.
Stars: ✭ 607 (+324.48%)
Mutual labels:  captcha, recaptcha
Recaptcha Spring Boot Starter
Spring Boot starter for Google's reCAPTCHA
Stars: ✭ 103 (-27.97%)
Mutual labels:  captcha, recaptcha

Google reCAPTCHA

npm version npm downloads Circle CI Codecov Standard JS

🤖 Simple and easy Google reCAPTCHA integration with Nuxt.js

📖 Release Notes

Setup

  1. Add @nuxtjs/recaptcha dependency with yarn or npm into your project
  2. Add @nuxtjs/recaptcha to modules section of nuxt.config.js
  3. Configure it:
{
  modules: [
    [
      '@nuxtjs/recaptcha', {
        /* reCAPTCHA options */
      }
    ],
  ]
}

using top level options

{
  modules: [
    '@nuxtjs/recaptcha',
  ],

  recaptcha: {
    /* reCAPTCHA options */
  },
}

Configuration

{
  // ...
  recaptcha: {
    hideBadge: Boolean, // Hide badge element (v3 & v2 via size=invisible)
    language: String,   // Recaptcha language (v2)
    siteKey: String,    // Site key for requests
    version: Number,     // Version
    size: String        // Size: 'compact', 'normal', 'invisible' (v2)
  },
  // ...
}

Runtime config

// nuxt.config.js
export default {
  publicRuntimeConfig: {
    recaptcha: {
      /* reCAPTCHA options */
      siteKey: process.env.RECAPTCHA_SITE_KEY // for example
    }
  }
}

Usage

reCAPTCHA v2

  1. Add <recaptcha> component inside your form:
<form @submit.prevent="onSubmit">
  <input autocomplete="true" placeholder="Email" type="email" v-model="email">
  <input autocomplete="current-password" placeholder="Password" type="password" v-model="password">
  <recaptcha />
  <button type="submit">Sign In</button>
</form>
  1. Call getResponse inside form submit handler to get reCAPTCHA token:
async onSubmit() {
  try {
    const token = await this.$recaptcha.getResponse()
    console.log('ReCaptcha token:', token)

    // send token to server alongside your form data

    // at the end you need to reset recaptcha
    await this.$recaptcha.reset()
  } catch (error) {
    console.log('Login error:', error)
  }
},

See: v2 example

reCAPTCHA v3

  1. Call init function inside mounted hook of your page
async mounted() {
  try {
    await this.$recaptcha.init()
  } catch (e) {
    console.error(e);
  }
}
  1. Call execute function form submit handler to get reCAPTCHA token:
async onSubmit() {
  try {
    const token = await this.$recaptcha.execute('login')
    console.log('ReCaptcha token:', token)

    // send token to server alongside your form data

  } catch (error) {
    console.log('Login error:', error)
  }
}
  1. Call destroy function inside beforeDestroy hook of the page. (This will remove reCAPTCHA scripts, styles and badge from the page)
beforeDestroy() {
  this.$recaptcha.destroy()
}

See: v3 example

Server Side

When you send data + token to the server, you should verify the token on the server side to make sure it does not requested from a bot. You can find out how to verify token on the server side by looking at the server middleware inside v2 example. (The server side is same for both versions)

Info Hiding Badges

You're allowed to hide the badge (i.e. for v3 and v2 invisible), as long as you include the recaptcha branding in the user flow.

For example:

<small>This site is protected by reCAPTCHA and the Google 
    <a href="https://policies.google.com/privacy">Privacy Policy</a> and
    <a href="https://policies.google.com/terms">Terms of Service</a> apply.
</small>

Development

  1. Clone this repository
  2. Install dependencies using yarn install or npm install
  3. Start development server using npm run dev

License

MIT License

Copyright (c) mvrlin [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].