1.0.0 • Published 9 years ago

nodejs-nocaptcha-recaptcha v1.0.0

Weekly downloads
9
License
GPL-2.0
Repository
github
Last release
9 years ago

nodejs-nocaptcha-recaptcha

A simple module to verify Google's new "no catpcha" recaptcha (namely v2)

Partially based on: New nocaptcha recaptcha with node js express

Dependencies

  • debug: ^2.1.3

Usage with express

recaptcha  = require('nodejs-nocaptcha-recaptcha');

router.post('/', function(req, res, next) {
    recaptcha(req.body["g-recaptcha-response"],"your.google.recaptcha.secretKey", function (success){
       if(!success){
          debug("CAPTCHA ERROR! Are you sure you are a human");
       }
       else{
          debug("CAPTCHA SUCCESS!");
       }
});