recaptcha
Package recaptcha is a middleware that provides reCAPTCHA integration for Flamego.
Installation
The minimum requirement of Go is 1.16.
go get github.com/flamego/recaptcha
Getting started
package main
import (
"github.com/flamego/flamego"
"github.com/flamego/recaptcha"
)
func main() {
f := flamego.Classic()
f.Use(recaptcha.V2(recaptcha.Options{
Secret: "<YOUR_SECRET_HERE>",
VerifyURL: recaptcha.VerifyURLGlobal,
}))
f.Get("/verify", func(c flamego.Context, r recaptcha.RecaptchaV2) {
response, err := r.Verify(input)
if response.Success{
//...
}
})
f.Run()
}
Getting help
- Please file an issue or start a discussion on the flamego/flamego repository.
License
This project is under the MIT License. See the LICENSE file for the full license text.