1.0.0 • Published 13 days ago

@zaneray/recaptcha-node v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
13 days ago

ZaneRay Recaptcha

  • turns recaptcha api call into a boolean

Requirements

Usage

in your node project

npm install --save @zaneray/recaptcha-node

in your application code

const Recaptcha = require('@zaneray/recaptcha-node');

//score ranges from 0 - 1.0 - lower numbers are more prone to be bots

const recaptcha = new Recaptcha(process.env.RECAPTCHA_SECRET_KEY, process.env.RECAPTCHA_MINUMUM_SCORE);

if (recaptcha.verify(req.body['g-recaptcha-response'])) {
    //likely not a bot, continue
} else {
    //likely a bot, handle this case elegantly so real users are not angry
}
1.0.0

13 days ago

0.0.7

8 months ago