Sign inSign up

vertisan/google-recaptcha-simulator

By vertisan

Updated over 5 years ago

A simple Google reCAPTCHA simulator for local development

Image
0

493

vertisan/google-recaptcha-simulator repository overview

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:

CodeDescription
missing-input-secretThe secret parameter is missing.
invalid-input-secretThe secret parameter is invalid or malformed.
missing-input-responseThe response parameter is missing.
invalid-input-responseThe response parameter is invalid or malformed.
bad-requestThe request is invalid or malformed.
timeout-or-duplicateThe response is no longer valid: either is too old or has been used previously.

Tag summary

Content type

Image

Digest

Size

90.5 MB

Last updated

over 5 years ago

docker pull vertisan/google-recaptcha-simulator