Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mathewparet/vue-recaptcha-invisible

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mathewparet/vue-recaptcha-invisible

A Vue.JS component for invisible recaptcha that falls back to native button if recaptcha is disabled in config, making it easy to have different settings for different environments.

  • 1.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@mathewparet/vue-recaptcha-invisible

A Vue.JS component for invisible recaptcha that falls back to native button if recaptcha is disabled in config, making it easy to have different settings for different environments.

Installation

# instal the module
npm install @mathewparet/vue-recaptcha-invisible

Registration

import Recaptcha from '@mathewparet/vue-recaptcha-invisible';
Vue.use(Recaptcha, { 
    enabled: true, 
    siteKey: '<site key from Google>'
});

Configuration - recaptcha.config.json

If you do not wish to pass the configuration while initializing the component - i.e, if you wish to register the component as Vue.use(Recaptcha) then you can define a JSON file of the below format and save it directly under your public directory. It must have the exact filename recaptcha.config.json.

{
    "siteKey": "<sitekey received from Google>",
    "enabled: true
}

For your convinience, a sample recaptcha.config.json file is placed in your project root (not the public directory) directory when you run npm install @mathewparet/vue-recaptcha-invisible. You can copy this file to the public directory and modify the configuration as needed.

Note - You need to add your<public_dir>/<recaptcha-config-file>.json to .gitignore since this configuration should be different for each environment.

If you wish to use a custom file name for the config file, then you will need to pass the same as an option when registering the compoenent, like:

import Recaptcha from '@mathewparet/vue-recaptcha-invisible';
Vue.use(Recaptcha, {
    url: '/my-custom-recaptcha-conf-file.json'
})

Usage

<recaptcha class-name="btn btn-primary">Submit</recaptcha> 

Note

Your <form> element MUST have an ID defined

Attributes

NameTypeRequiredDescription
class-nameStringNoCSS Class name to be applied.

FAQs

Package last updated on 11 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc