Account Switcher by Packstub
CommunitySwitch between accounts without signing out: linked sub-accounts with password-confirmed escalation, impersonation with a switch-back banner, and one-click developer logins.
Author:
Packstub
Package health
Automated checks of this plugin's Composer package
15 checks
- Passed: 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
- Passed: Dependabot or Renovate configured
- Passed: Dependency update cooldown configured
- Passed: Provides a security policy
- Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
- Passed: Commit and release recency — Active: last commit 9 days ago; last release 24 days ago.
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Passed: Dist archive is lean
-
Passed:
Current Laravel version supported
—
Package dependencies resolve together with current Laravel
13.0. -
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
- Features
- Compatibility
- Installation
- Linked accounts
- Impersonation
- Developer logins
- Configuration
- Documentation
- Testing
- Changelog
- Security vulnerabilities
- Credits
- License
Switch between accounts in a Filament panel without signing out — safely, in production.
#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.
- Configurable per panel: turn each feature on or off, add your own rules, move the banner.
- Dark mode and translations: built from Filament components, every string in a language file.
Formerly xlite-dev/filament-impersonate — see the upgrade guide.
#Compatibility
| Plugin | Filament | Laravel | PHP |
|---|---|---|---|
| 4.x | 4.x, 5.x | 12.x, 13.x | 8.2+ |
3.x (xlite-dev/filament-impersonate) |
4.x, 5.x | 9.x – 12.x | 8.1+ |
#Installation
composer require packstub/filament-account-switcher
php artisan packstub-account-switcher:install
Add the trait to your user model and the plugin to your panel:
use Packstub\AccountSwitcher\Concerns\HasLinkedAccounts;
class User extends Authenticatable implements FilamentUser
{
use HasLinkedAccounts;
public function canImpersonate(User $target): bool
{
return $this->hasRole('super-admin');
}
}
use Packstub\AccountSwitcher\AccountSwitcherPlugin;
$panel->plugin(
AccountSwitcherPlugin::make()
->developerLogins(['admin@example.com', 'user@example.com']),
);
Full walkthrough: Installation.
#Linked accounts
Link the accounts one person owns. A Switch to menu next to the user menu lists them with their label and e-mail.

Switching down to a lower-privilege account is one click. Switching up asks for the target account's password, so a compromised daily session can never reach the admin account on its own.

The Linked accounts page (in the user menu) links an existing account, creates a sub-account, renames links and sets the per-link password rule.

// Or link programmatically — one click down, password up
$admin->linkAccount($daily, label: 'Daily', requiresPassword: false);
Read more: Linked accounts · Security model.
#Impersonation
Drop ImpersonateAction into your users table or a page header. It is hidden for records the current user may not impersonate, based on canImpersonate() / canBeImpersonated() on your model.
use Packstub\AccountSwitcher\Filament\Actions\ImpersonateAction;
->recordActions([
ImpersonateAction::make(),
])

While impersonating, a banner stays visible on every page with a Switch back button.

Read more: Impersonation.
#Developer logins
One-click sign-in for the accounts you seed, shown under the login form. They only render in the environments listed in the config (local by default), whatever the panel says.
AccountSwitcherPlugin::make()
->developerLogins(['admin@example.com', 'user@example.com'])

Read more: Developer logins.
#Configuration
AccountSwitcherPlugin::make()
->impersonation() // on by default
->linkedAccounts() // on by default
->developerLogins(['admin@example.com']) // off by default
->canImpersonateUsing(fn (User $by, User $target) => $by->can('impersonate', $target))
->canSwitchUsing(fn (User $from, User $to) => ! $to->is_locked)
->banner(position: 'top', style: 'light')
->redirectTo('/admin')
Read more: Configuration — the config file, events, the switch log and the AccountSwitcher facade.
#Documentation
The same pages live in the docs/ directory of this repository.
#Testing
composer test
#Changelog
See the changelog.
#Security vulnerabilities
Please e-mail support@packstub.dev rather than opening a public issue.
#Credits
#License
MIT. See the license file.
The author
Packstub builds plugins for Filament and Laravel, from open-source utilities to paid infrastructure for multi-tenant SaaS. It is the author of Packstub Tenancy, which brings stancl/tenancy's database-per-tenant model to Filament panels, and Filament Account Switcher, which adds linked accounts, impersonation, and developer logins with an audit trail. Packstub is run by XLITE, a web development studio based in Moldova.
From the same author
Flow
Visual workflows in your panel: record, schedule and webhook triggers, conditions, email, Slack and HTTP actions, approvals.
Author:
Packstub
Tenancy
Multi-database tenancy powered by stancl/tenancy v4 — one isolated database per tenant or shared databases with tenant_id scoping, async provisioning, and a load-balanced database pool that scales tenants across multiple database servers.
Author:
Packstub
Agents
An AI assistant in your panel and an MCP server for Claude Code from one tool list, with the panel's own authorization.
Author:
Packstub
Form Builder
Build forms in your Filament panel, render them with Blade, Livewire or JSON, and collect, export and forward submissions.
Author:
Packstub
Featured Plugins
A selection of plugins curated by the Filament team
Compact Theme
A theme that makes data-heavy panels easier to scan by fitting more useful information on each screen.
Filament
Spotlight Pro
Browse your Filament Panel with ease. Filament Spotlight Pro adds a Spotlight like Command Palette to your Filament Panel.
Dennis Koch
Custom Dashboards
Let your users build and share their own dashboards with a drag-and-drop interface. Define your data sources in PHP and let them do the rest.
Filament
