Socket
Socket
Sign inDemoInstall

invisible-grecaptcha

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    invisible-grecaptcha

Invisible reCAPTCHA integration


Version published
Weekly downloads
33
increased by37.5%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

invisible-grecaptcha

npm (scoped) Travis Coveralls XO code style

Invisible reCAPTCHA integration

Checkout the demo.

Table of Contents

Install

This project uses node and npm. Go check them out if you don't have them locally installed.

$ npm install --save invisible-grecaptcha

The UMD build is also available on jsdelivr:

<script src="https://cdn.jsdelivr.net/npm/invisible-grecaptcha/dist/index.min.js"></script>

You can find the library on window.invisibleGrecaptcha.

Usage

import {
  createInvisibleGrecaptcha, 
  execute, 
  reset, 
  getResponse,
} from 'invisible-grecaptcha'

function verifyCallback(token) {
  console.log(token)
}

const grecaptcha = await createInvisibleRecaptcha({
  sitekey: 'RECAPTCHA_SITE_KEY',
  callback: verifyCallback
})

execute(grecaptcha)
reset(grecaptcha)
getResponse(grecaptcha)

API

Table of Contents

createInvisibleGrecaptcha

Create an invisible grecaptcha and returns the id of the capctha.

Parameters

  • options Object The options to create a invisible recaptcha.

Returns number

execute

Programatically invoke the reCAPTCHA check.

Parameters

  • recaptchaId number Captcha id.

reset

Resets the reCAPTCHA widget.

Parameters

  • recaptchaId number Captcha id.

getResponse

Gets the response for the reCAPTCHA widget.

Parameters

  • recaptchaId number Captcha id.

Returns string

verifyCallback

Callback to be executed when the user submits a successful CAPTCHA response.

Type: Function

Parameters

Contributing

See the contributing file.

License

MIT License © Thiago Santos

Keywords

FAQs

Last updated on 31 Jan 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc