recaptcha

    You can read source code of this middleware on GitHubopen in new window and API documentation on .

    The minimum requirement of Go is 1.16.

    Usage examples

    Examples included in this section is to demonstrate the usage of the recaptcha middleware, by no means illustrates the idiomatic or even correct way of doing user authentication.

    The is used in combination with recaptcha.Optionsrecaptcha - 图5open in new window for integration, and the should be used to verify response tokens:

    • main.go

    reCAPTCHA v2

    The is used in combination with open in new window for integration, and the recaptcha.RecaptchaV2.Verify should be used to verify response tokens.

    The following example is using the “I’m not a robot” Checkbox type of challenge:

    • main.go
    • templates/home.tmpl