Changelog

laravel-go-captcha Alpha Laravel for Go

Unreleased

[0.1.0] - 2026-12-04

The first release, an alpha: a self-hosted image captcha for Laravel for Go, ported from mews/captcha 3.5.1. The API may still change before 1.0.

Added

  • Session captchas for forms (GET /captcha/{profile}, captcha.Rule) and keyed captchas for APIs (GET /captcha/api/{profile}, captcha.Keyed, captcha.KeyedWith, captcha.Issue).
  • The five profiles mews/captcha ships, captcha.Defaults() with PHP's class defaults, and math profiles.
  • Images drawn in mews/captcha's order with its bundled fonts and backgrounds, matching GD's filters and resize; the build tag captcha_noassets leaves the assets out.
  • captcha.Check, captcha.CheckKey, and the detailed verdicts of CheckSession and CheckKeyed.
  • captcha.Src, captcha.Img, captcha.Image, and the template functions captchaSrc, captchaImg and captchaField, with an optional refresh script.
  • captcha.ParsePHPConfig, which reads an exported config('captcha').
  • captchatest.Disable and captchatest.Record for application tests.
  • Config.Renderer for drawing images yourself.

Security

  • Each challenge has its own random id and is consumed atomically: of many simultaneous correct answers, exactly one passes, on Redis and on the database cache.
  • The answer is never stored or sent; the store keeps a keyed verifier.
  • Wrong answers are limited per client and profile, and image requests per client.
  • The package refuses a cache store that can't keep challenges safely, and runs store operations outside the caller's database transaction, reading from the writer.

Compatibility

  • Go 1.27 or newer, go.laravel.com v0.2.0.
  • Behaviour that differs from mews/captcha is listed in the README and in Migrating from PHP.