Turnstile by Muazzam Ali khan
CommunityCloudflare Turnstile panel plugin — register once to auto-protect login, registration, and password reset.
Author:
Muazzam Ali khan
Package health
Automated checks of this plugin's Composer package
15 checks
- Skipped: GitHub Actions pinned to SHA
- Skipped: GitLab CI includes pinned to SHA
- Passed: Open security advisories
- Passed: Dependabot PR responsiveness — No open Dependabot PRs.
- Skipped: Renovate MR responsiveness
- Skipped: Dependabot or Renovate configured
- Skipped: Dependency update cooldown configured
- Failed: Provides a security policy — View details on Plumb
- Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
- Passed: Commit and release recency — Active: last commit 33 days ago; last release 34 days ago.
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Passed: Dist archive is lean
-
Warning:
Current Laravel version supported
—
Package does not co-install with current Laravel
13.0; the newest co-installable line is12.0, which receives security patches only (until 2027-02-24). -
Passed:
Current PHP version supported
—
Constraint
^8.2supports current PHP8.5. - Skipped: Current Symfony version supported
filament/
namespace. Review the source and install at your own risk. Found
malware or an unresolved security issue the author won't
address?
Report it
.
Documentation
- Requirements
- Installation
- Usage
- Local / CI testing
- Configuration
- Publish views
- Testing this package
- Support
- License
Cloudflare Turnstile panel plugin for Filament v5. Register it once on a panel and login is protected automatically — optionally registration and password-reset request too. No form schema edits for the common case.
#Requirements
| Dependency | Version |
|---|---|
| PHP | ^8.2 |
| Laravel | ^11 / ^12 |
| Filament | ^5.0 |
#Installation
composer require muazzambuilds/filament-turnstile
Publish the config (optional):
php artisan vendor:publish --tag=filament-turnstile-config
Add your keys to .env:
TURNSTILE_SITE_KEY=your-site-key
TURNSTILE_SECRET_KEY=your-secret-key
Create a widget and get keys at dash.cloudflare.com → Turnstile.
#Usage
#Panel plugin (recommended)
Call ->plugin(...) after ->login() / ->registration() / ->passwordReset() so the plugin can swap the auth page classes:
use MuazzamBuilds\FilamentTurnstile\TurnstilePlugin;
public function panel(Panel $panel): Panel
{
return $panel
->login()
->registration()
->passwordReset()
->plugin(
TurnstilePlugin::make()
->protectRegistration() // opt-in
->protectPasswordReset() // opt-in (request page only)
);
}
Defaults: login is protected; registration and password-reset request are not.
#Widget options
TurnstilePlugin::make()
->theme('auto') // auto | light | dark
->size('flexible') // normal | flexible | compact
->language('en-US')
->enabled(true);
#Manual form field
For custom auth pages or any Filament form:
use MuazzamBuilds\FilamentTurnstile\Forms\Components\Turnstile;
Turnstile::make('cf-turnstile-response')
->theme('dark')
->size('compact')
->turnstileAction('contact');
Disable auto-swap and extend or compose yourself:
->login(CustomLogin::class)
->plugin(TurnstilePlugin::make()->protectLogin(false))
#Custom auth pages
Extend the packaged pages or use the trait:
use MuazzamBuilds\FilamentTurnstile\Pages\Auth\Login as TurnstileLogin;
class Login extends TurnstileLogin
{
//
}
#Local / CI testing
Cloudflare test keys (any hostname, including localhost):
| Purpose | Site key | Secret key |
|---|---|---|
| Always passes | 1x00000000000000000000AA |
1x0000000000000000000000000000000AA |
| Always blocks | 2x00000000000000000000AB |
2x0000000000000000000000000000000AA |
If keys are missing, the widget is hidden and server validation is skipped so local apps without Turnstile still boot.
#Configuration
// config/filament-turnstile.php
return [
'site_key' => env('TURNSTILE_SITE_KEY'),
'secret_key' => env('TURNSTILE_SECRET_KEY'),
'verify_url' => env('TURNSTILE_VERIFY_URL', 'https://challenges.cloudflare.com/turnstile/v0/siteverify'),
'theme' => env('TURNSTILE_THEME', 'auto'),
'size' => env('TURNSTILE_SIZE', 'flexible'),
'language' => env('TURNSTILE_LANGUAGE'),
'reset_event' => env('TURNSTILE_RESET_EVENT', 'turnstile-reset'),
];
#Publish views
php artisan vendor:publish --tag=filament-turnstile-views
#Testing this package
composer install
composer test
#Support
If this package helps you, consider supporting development:
#License
MIT — see LICENSE.
The author
AI Engineer & Laravel Developer building intelligent SaaS products, AI agents, and Filament applications. I help founders ship production-ready software — from AI automation to Laravel & Filament admin panels, SaaS platforms, and AI-powered ecommerce. I publish plugins and tutorials as Muazzam Builds.
What I'm Building
- AI Agents & business automation
- Laravel & Filament applications
- SaaS products and AI ecommerce
Tech Stack
Laravel • PHP • Filament • Livewire • MySQL • Python • Docker • OpenAI • Cloudflare • AWS
Connect
From the same author
AI Actions
OpenAI-powered actions for Filament v5. Drop complete Summarize, Rewrite, and Classify actions onto tables and forms — no DIY prompt wiring. Install via Composer, set OPENAI_API_KEY, then attach actions to table record actions or page header actions. Optionally write results back to a model attribute with applyTo().
Author:
Muazzam Ali khan
Recycle Bin
Central soft-deletes recycle bin for Filament v5. Register once, then restore or permanently delete trashed records from every SoftDeletes model in one place.
Author:
Muazzam Ali khan
Ban Guard
Ban or suspend users from your panel, with middleware that also blocks API access and login.
Author:
Muazzam Ali khan
Panel Branding
Rebrand your Filament panel from a settings page — logos, colors, fonts, layout, footer, and custom CSS, with per-panel and optional per-tenant support.
Author:
Muazzam Ali khan
Featured Plugins
A selection of plugins curated by the Filament team
Blueprint
Filament Blueprint is a premium Laravel Boost extension that helps AI agents produce accurate, detailed implementation plans and security reports for Filament apps.
Filament
Compact Theme
A theme that makes data-heavy panels easier to scan by fitting more useful information on each screen.
Filament
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese