This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

grecaptcha
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/grecaptcha package

1.0.3 • Public • Published

grecaptcha

reCAPTCHA v3 / v2 client for Node

GitHub | NPM

Install

npm i grecaptcha

Usage in async context

const Grecaptcha = require('grecaptcha')
 
const client = new Grecaptcha('secret')
 
if (await client.verify('token')) {
    // reCAPTCHA response was accepted!
}
else {
    // reCAPTCHA token denied.
}

Usage in non-async context

const client = new Grecaptcha('secret')
 
client.verify('token').then((accepted) => {
    if (accepted) {
        // reCAPTCHA response was accepted!
    }
    else {
        // reCAPTCHA token denied.
    }
}).catch((err) =>  {
    // Request failed.
})

Package Sidebar

Install

npm i grecaptcha

Weekly Downloads

1,237

Version

1.0.3

License

SEE LICENSE IN LICENSE.md

Unpacked Size

3.26 kB

Total Files

4

Last publish

Collaborators

  • ethan_