h-exx / captcha-check

A module to easily integrate reCAPTCHA and other services

Home Page:https://www.npmjs.com/package/captcha-check

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

captcha-check

A module to easily integrate reCAPTCHA and other services

Changelog

1.0.0 - captcha-check was created! 🎉

  • Added reCAPTCHAv2 & hCaptcha

Usage

const Captcha = require('captcha-check');

// Adding a captcha service. Captcha services are available in the readme.md
const captcha = new Captcha({service:'recaptcha', secretkey:process.env.SECRET});

// returns true|false. ipAddress optional
captcha.check(res.captchaResponse, ipAddress);

// returns an array. {success: true|false, timestamp: timestamp (ISO format yyyy-MM-dd'T'HH:mm:ssZZ), hostname: string}
captcha.detailedCheck(res.captchaResponse, ipAddress);

Supported Captcha services

Captcha Service Tag Notes
reCAPTCHAv2 recaptcha
reCAPTCHAv2 Invis recaptcha
hCaptcha hcaptcha

About

A module to easily integrate reCAPTCHA and other services

https://www.npmjs.com/package/captcha-check

License:MIT License


Languages

Language:JavaScript 100.0%