Skip to content

BrianEmilius/async-recaptcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async-recaptcha

Handles Google reCaptcha verification asynchronously.

Installation

npm i -S async-recaptcha

Usage

const asyncRecaptcha = require("async-recaptcha"),
      secret         = "your google reCaptcha secret key";

// this example uses express/body-parser to get the g-captcha-response string
asyncRecaptcha(req.body['g-recaptcha-response'], secret)
    .then(function() {
        // success
    })
    .catch(function(error) {
        // fail
        console.log(error);
    });

Documentation

asyncRecaptcha(captchaResponse, secret)

Validate Google reCaptcha

Parameters

Name Type Description
captchaResponse string 'g-captcha-response'
secret string your Google reCaptcha secret string

Returns

Promise

About

Handles Google reCaptcha verification asynchronously

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published