Cloudflare Turnstile
CommunityA plugin to help you implement the Cloudflare Turnstile into your Filament panels.
Author:
Mustafa Afat
Package health
BetaAutomated checks of this plugin's Composer package
13 checks
-
Warning:
Current Laravel version supported
—
Package does not co-install with current Laravel
13.0; the newest co-installable line is12.0, which still receives active support but is not the current stable. -
Passed:
Current PHP version supported
—
Constraint
^8.1supports current PHP8.5. - Skipped: Current Symfony version supported
- Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
- Failed: Commit and release recency — Inactive: last commit 505 days ago; last release 505 days ago. View details on Plumb
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Passed: Dist archive is lean
- Failed: GitHub Actions pinned to SHA — View details on Plumb
- Passed: Open security advisories
- Passed: Dependabot PR responsiveness — No open Dependabot PRs.
- Failed: Dependabot or Renovate configured — No dependency updater configuration found. View details on Plumb
- Skipped: Dependency update cooldown configured
- Passed: Provides a security policy
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
- Installation
- Getting Started
- Form Component Usage
- Integrating Turnstile Captcha to Filament's Login Page
- Testing
- Changelog
- Contributing
- Security Vulnerabilities
- Credits
- License
A plugin to help you implement the Cloudflare Turnstile into your Filament panels.

This extension leverages Laravel Turnstile under the hood. For more details, please refer to the README on the project page.
Kudos to coderflexx for his remarkable work.
#Installation
You can install the package via composer:
composer require afatmustafa/filamentv3-turnstile
#Getting Started
To include Cloudflare Turnstile in your app, you'll first need to obtain both the SiteKey and the SecretKey from your Cloudflare dashboard.
Once you have the keys, populate the TURNSTILE_SITE_KEY and TURNSTILE_SECRET_KEY fields in your .env configuration:
TURNSTILE_SITE_KEY=2x00000000000000000000AB
TURNSTILE_SECRET_KEY=2x0000000000000000000000000000000AA
For testing purposes, Cloudflare offers Dummy site keys and secret keys. Consider using them if needed.
TURNSTILE_SITE_KEY=1x00000000000000000000AA
TURNSTILE_SECRET_KEY=1x0000000000000000000000000000000AA
More dummy keys, please refer to the Cloudflare documentation.
#Form Component Usage
Now using Turnstile is quite simple, all you need to do is follow the code below:
use Afatmustafa\FilamentTurnstile\Forms\Components\Turnstile;
Turnstile::make('turnstile')
->theme('light') // Supported themes: light, dark
->size('normal') // Supported sizes: normal, compact
->language('en-US') // Supported languages: ar-eg,de,en,es,fa,fr,id,it,ja,ko,nl,pl,pt-br,ru,tr,uk,zh-cn and zh-tw
#Integrating Turnstile Captcha to Filament's Login Page
To seamlessly integrate the Turnstile captcha with the login page in Filament, follow these steps:
- Create a new
Loginclass under theapp/Filament\Pages\Authdirectory, and extend it from theFilament\Pages\Auth\Loginclass.
Override theformmethod, and add theTurnstilecomponent to the form schema.
namespace App\Filament\Pages\Auth;
use Filament\Forms\Form;
use Afatmustafa\FilamentTurnstile\Forms\Components\Turnstile;
class Login extends \Filament\Pages\Auth\Login
{
public function form(Form $form): Form
{
return $form
->schema([
$this->getEmailFormComponent(),
$this->getPasswordFormComponent(),
$this->getRememberFormComponent(),
Turnstile::make('turnstile')
->theme('light')
->size('normal')
->language('en-US'),
])
->statePath('data');
}
}
2. In your PanelProvider file, override the login method, and return the newly created Login class.
namespace App\Providers\Filament;
...
use App\Filament\Pages\Auth\Login;
...
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->default()
->id('admin')
->path('app')
->login(Login::class)
...
}
}
3. That's it! You should now see the Turnstile captcha on the login page.

#Testing
composer test
#Changelog
Please see CHANGELOG for more information on what has changed recently.
#Contributing
Please see CONTRIBUTING for details.
#Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
#Credits
#License
The MIT License (MIT). Please see License File for more information.
The author
Mustafa is a highly motivated Backend Developer with extensive experience in PHP and Laravel. His committed to achieving high levels of efficiency, and continually seek ways to optimize processes. His passion lies in driving innovation and delivering high-quality projects through the effective use of technology.
From the same author
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
Custom Fields
Eliminate custom field migrations forever. Let your users create and manage form fields directly in Filament admin panels with 20+ built-in field types, validation, and zero database changes.
Relaticle
Data Lens
Advanced Data Visualization for Laravel Filament - a premium reporting solution enabling custom column creation, sophisticated filtering, and enterprise-grade data insights within admin panels.
Padmission