Skip to content

A package for verifying Google reCaptcha v3 responses in Go

License

Notifications You must be signed in to change notification settings

hazcod/gorecaptcha

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-recaptcha

About

This package handles reCaptcha (API version 3.0) form submissions in Go.

Usage

Install the package in your environment:

go get github.com/hazcod/go-recaptcha

To use it within your own code, import github.com/hazcod/go-recaptcha and call:

recaptcha := Recaptcha{ PrivateKey: "your-recaptcha-private-key" }

Now call recaptcha.Verify(remoteip net.IP, action string, response string, minScore uint) which will return (success bool, err error).

Usage Example

Included with this repo is example.go, a simple HTTP server which creates the reCaptcha form and tests the input.

See the instructions for running the example for more details.

About

A package for verifying Google reCaptcha v3 responses in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%