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
53
increased by12.77%
Maintainers
1
Install size
29.8 kB
Created
Weekly downloads
 

Readme

Source

invisible-grecaptcha

npm (scoped) Travis 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 { 
  execute, 
  destroy, 
} from 'invisible-grecaptcha'


const token = await execute('RECAPTCHA_SITE_KEY')

destroy()

API

Table of Contents

execute

Creates an invisible reCAPTCHA instance, dynamically loading Google's library if necessary, and then returns a user response token. This is a client-side step, and the token must be sent to the server side for verification as a separate step. Tokens are single use and can be verified only once.

Parameters

  • sitekey string Your recaptcha sitekey. You can get one here: https://www.google.com/recaptcha/admin.
  • options Object? The options to create an invisible reCAPTCHA. (optional, default {})
    • options.locale string Language of the captcha. See available language codes https://developers.google.com/recaptcha/docs/language. Auto-detects the user's language if unspecified. (optional, default en)
    • options.position string Position the reCAPTCHA badge. Values: bottomright, bottomleft and inline. (optional, default bottomright)
    • options.baseUrl (optional, default 'https://www.google.com')

Returns string

destroy

Destroy the instance of an invisible grecaptcha.

Contributing

See the contributing file.

License

MIT License © Thiago Santos

Keywords

FAQs

Last updated on 06 Jun 2020

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