@coryparsnipson/hcaptcha
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

hcaptcha

Verify hCaptcha token validity; simply w/ no dependencies.

Install

npm install --save hcaptcha

Usage

const {verify} = require('hcaptcha');

const secret = 'my hcaptcha secret from hcaptcha.com';
const token = 'token from widget';

verify(secret, token)
  .then((data) => {
    if (data.success === true) {
      console.log('success!', data);
    } else {
      console.log('verification failed');
    }
  })
  .catch(console.error);

Readme

Keywords

Package Sidebar

Install

npm i @coryparsnipson/hcaptcha

Weekly Downloads

1

Version

0.2.4

License

MIT

Unpacked Size

7.44 kB

Total Files

7

Last publish

Collaborators

  • coryparsnipson