🙋A module for verifying ReCaptcha responses
Options
- secret (String) - Google ReCaptcha server secret
- sendIp (Boolean) - Only available for middleware, will send the
request.ip
value to be verified - endRequest (Boolean) - Only available for middleware, if the checks fail it will send a 400 response and not continue the middleware chain
Usage
Express / Connect
When using IMAR with Express it needs a bodyParser higher up the middleware chain as it reads the ReCaptcha response
from request.body['g-recpatcha-response']
var ReCaptcha = ;var bodyParser = ; app;app;
Standalone
You can use IMAR without Express by calling .check(response, [ip])
the IP value is optional, this will return a promise.
var ReCaptcha = ; ReCaptcha