Packstub

Filament Account Switcher

Filament Account Switcher

Switch between accounts in a Filament panel without signing out — safely, in production. Free and open source (MIT).

Features

  • Linked accounts: work from a low-privilege account and switch up to admin only when you need it.
  • Impersonation: an action for your users table, a banner with Switch back, rules on your model.
  • Developer logins: one-click sign-in buttons for your seeded accounts, only in the environments you allow.
  • Audit trail: every switch logged with who, why and from where, plus events.
  • Security: switching up asks for the target account's password; each feature has a written threat model.

Guides

Guide What it covers
Installation Requirements, the install command, the user model trait, and registering the plugin
Linked accounts The "Switch to" menu, the Linked accounts page, sub-accounts, and the password rule
Impersonation The action, the banner, authorization hooks, and switching back
Developer logins Login-page buttons for local development and how they are gated
Configuration The fluent AccountSwitcherPlugin API, the config file, events, the switch log, and the facade
Security The threat model behind each feature and the guarantees the plugin makes

At a glance

composer require packstub/filament-account-switcher
php artisan packstub-account-switcher:install
use Packstub\AccountSwitcher\AccountSwitcherPlugin;

$panel->plugin(
    AccountSwitcherPlugin::make()
        ->developerLogins(['admin@example.com', 'user@example.com']),
);

Requirements

PHP 8.2+, Laravel 12 or 13, Filament 4 or 5.


These pages are published at packstub.dev/docs/filament-account-switcher from the package's docs/ directory. Spotted a mistake? Open a pull request.