restify-no-captcha
This is a small middleware to use with restify to verify Recaptcha response from google reCaptcha
First thing first
npm install --save restify-no-captcha
Usage
...
var recaptchaFactory = require('restify-no-captcha');
var mySecretRecaptchaFromGoogle = 'xxxxxxDDDDAAAAbhq2P9NkorGs3bjseddDd-xz43';
var verifyRecaptchaMiddleware = recaptchaFactory.VerifyCaptchaFactory(mySecretRecaptchaFromGoogle);
...
...
server.post('/some-endpoint', [
verifyRecaptchaMiddleware,
myController.post
]);
...
body : {
recaptchaResponse : 'captchaResponse'
}