Thanks to visit codestin.com
Credit goes to github.com

Skip to content

tetsuo/recaptcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github.com/tetsuo/recaptcha

Verify Google reCAPTCHA challenge responses using the reCAPTCHA siteverify API.

Usage

package main

import (
	"context"
	"fmt"
	"net/http"

	"github.com/tetsuo/recaptcha"
)

func main() {
	resp, err := recaptcha.Verify(context.Background(), http.DefaultClient,
    "response-token", "your-secret-key", "user-ip")
	if err != nil {
		// handle error
	}
	if resp.Success {
		fmt.Println("reCAPTCHA verified!")
	} else {
		fmt.Println("Verification failed:", resp.ErrorCodes)
	}
}

About

Verify reCAPTCHA challenge responses

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages