0.0.22 • Published 9 years ago

recaptcha-validate v0.0.22

Weekly downloads
4
License
BSD
Repository
github
Last release
9 years ago

Recaptcha Validate

Just a simple library to correctly validate google recaptcha requests. Returns a promise.

Usage:

var recaptchaValidate = require('recaptcha-request');
var promise = recaptchaValidate(secret, response, remoteIp);

The promise is fulfilled if the recaptcha could be validated, if not it is resolved with an error. Most of the time the error will be a plain string direct from google: missing-input-secret, invalid-input-secret, missing-input-response, invalid-input-response or unspecified-error but in the case of network issues it'll be a normal error object.

Perfect to yield with co/koa!