PHPackages                             muazzambuilds/filament-turnstile - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. muazzambuilds/filament-turnstile

ActiveLibrary

muazzambuilds/filament-turnstile
================================

Cloudflare Turnstile panel plugin for Filament v5 — register once, auto-protect login (and optionally registration / password reset).

v1.0.0(1mo ago)964↓25%1[1 PRs](https://github.com/muazzambuilds/filament-turnstile/pulls)MITPHPPHP ^8.2

Since Jul 13Pushed 1mo agoCompare

[ Source](https://github.com/muazzambuilds/filament-turnstile)[ Packagist](https://packagist.org/packages/muazzambuilds/filament-turnstile)[ Docs](https://github.com/muazzambuilds/filament-turnstile)[ RSS](/packages/muazzambuilds-filament-turnstile/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

Filament Turnstile
==================

[](#filament-turnstile)

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
------------

[](#requirements)

DependencyVersionPHP`^8.2`Laravel`^11` / `^12`Filament`^5.0`Installation
------------

[](#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](https://dash.cloudflare.com) → **Turnstile**.

Usage
-----

[](#usage)

### Panel plugin (recommended)

[](#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

[](#widget-options)

```
TurnstilePlugin::make()
    ->theme('auto')      // auto | light | dark
    ->size('flexible')   // normal | flexible | compact
    ->language('en-US')
    ->enabled(true);
```

### Manual form field

[](#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

[](#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
------------------

[](#local--ci-testing)

Cloudflare test keys (any hostname, including `localhost`):

PurposeSite keySecret keyAlways 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
-------------

[](#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
-------------

[](#publish-views)

```
php artisan vendor:publish --tag=filament-turnstile-views
```

Testing this package
--------------------

[](#testing-this-package)

```
composer install
composer test
```

Support
-------

[](#support)

If this package helps you, consider supporting development:

[![Buy Me A Coffee](https://camo.githubusercontent.com/ae1848f99ea87c538c70dd9051798b769ba715939b8398ed02ad68a7da5d22bc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275792532304d6525323061253230436f666665652d6666646430303f7374796c653d666f722d7468652d6261646765266c6f676f3d6275792d6d652d612d636f66666565266c6f676f436f6c6f723d626c61636b)](https://buymeacoffee.com/muazzambuilds)

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance90

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

48d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/300896156?v=4)[Muazzam Ali Khan](/maintainers/muazzambuilds)[@muazzambuilds](https://github.com/muazzambuilds)

---

Top Contributors

[![muazzambuilds](https://avatars.githubusercontent.com/u/300896156?v=4)](https://github.com/muazzambuilds "muazzambuilds (2 commits)")

---

Tags

laravelcaptchacloudflarefilamentfilament-pluginturnstile

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/muazzambuilds-filament-turnstile/health.svg)

```
[![Health](https://phpackages.com/badges/muazzambuilds-filament-turnstile/health.svg)](https://phpackages.com/packages/muazzambuilds-filament-turnstile)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

818355.4k3](/packages/defstudio-telegraph)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80732.6M270](/packages/laravel-mcp)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5226.7k](/packages/simplestats-io-laravel-client)[illuminate/auth

The Illuminate Auth package.

10528.8M1.4k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
