nodejs-nocaptcha-recaptcha

A module to verify Google's new no catpcha recaptcha

Usage no npm install needed!

<script type="module">
  import nodejsNocaptchaRecaptcha from 'https://cdn.skypack.dev/nodejs-nocaptcha-recaptcha';
</script>

README

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!");
       }
});