Skip to content

vertisan/google-recaptcha-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google reCaptcha Simulator

The project aims to simulate some of Google's reCaptcha behavior. The service will be useful for development purposes when we do not have a website with a visual widget (e.g. work on the API) or for testing response codes.

Technology Stack

  • Node 14
  • Typescript

Usage

Run container:

docker run vertisan/google-recaptcha-simulator:latest

then just send a request like for real Google reCaptcha:

POST http://localhost/recaptcha/api/siteverify

with Content-Type: application/x-www-form-urlencoded and request data:

secret: <string>
response: <string>

secret is checked only for: whether it exists and whether it is not empty, while response can be used as follows:

  • To test supported errors, just send response with code of this error, e.g. missing-input-secret and you'll get success: false with this error.
  • Any other values that are not matches error codes will return the result as a valid captcha (success: true).

Supported errors

We are supporting all error codes provided by Google:

Code Description
missing-input-secret The secret parameter is missing.
invalid-input-secret The secret parameter is invalid or malformed.
missing-input-response The response parameter is missing.
invalid-input-response The response parameter is invalid or malformed.
bad-request The request is invalid or malformed.
timeout-or-duplicate The response is no longer valid: either is too old or has been used previously.

About

A simple Google reCAPTCHA simulator for local development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published