coderflex/filament-turnstile
Filament Turnstile adds Cloudflare Turnstile bot protection to Filament forms, with a ready-made field for login and other forms. Works with Filament V2-V5 and ships test keys so you can get started quickly.
Turnstile::make('captcha') component into any Filament form, including the panel login page, which is the highest-value target (admin login brute force, session enumeration). This directly supports a security hardening roadmap item that would otherwise be scoped as custom middleware plus a Blade partial.coderflex/laravel-turnstile. This is a "buy the integration, own the config" decision: you get Cloudflare's managed challenge model (no user puzzles, no user tracking model like reCAPTCHA) for the cost of a Composer dependency and two env vars.reset-captcha event plus throwFailureValidationException() / onValidationError() hooks solve the real failure mode: a user fails login validation, the token is consumed, and every subsequent attempt fails for reasons that look like a broken page. Shipping this correctly changes the support-ticket profile of the feature.^1/^2/^3/^4). That gives a clear upgrade path and a concrete line item for any pending Filament major upgrade.Adopt when:
^4.0 line requires Filament v5, Laravel 11/12/13, and PHP 8.3/8.4. Teams on older stacks must pin ^3, ^2, or ^1, which means a slower patch path.Look elsewhere / mitigate when:
coderflex/laravel-turnstile or Cloudflare's siteverify endpoint and keep the ~50 lines in-house.light/dark/auto), size, and language are configurable and pass through to Cloudflare's client config, which is adequate but not deep.For executives — one paragraph: "Admin panel login is our most attractive target for automated credential attacks, and today it is defended only by passwords. This package adds Cloudflare Turnstile — an invisible bot challenge — to Filament's login and form pages in a small, low-cost change. It's MIT-licensed, roughly a wrapper around an existing Laravel integration, and requires two environment variables and one Cloudflare account. Users see no puzzles, so it doesn't cost us conversions the way reCAPTCHA does. The trade-off is honest: the project is small and single-maintainer, so we treat it as code we own, pin the version, and keep the option to inline it if the maintainer steps away. Recommendation: adopt on the admin login now, pilot on public forms, and measure blocked-attempt volume for one quarter before expanding."
For engineering — the shape of the work:
coderflex/filament-turnstile, version pinned to your Filament line), TURNSTILE_SITE_KEY / TURNSTILE_SECRET_KEY in env, and a Turnstile::make('captcha') component in the target form schema.reset-captcha from onValidationError() or override throwFailureValidationException() so a failed attempt doesn't burn the token and lock users out on retry. Reviewers should treat a missing reset as a defect, not tech debt.Filament\Pages\Auth\Login and pointing the panel's ->login(Login::class) at it — small, contained, and reversible.How can I help you explore Laravel packages today?