Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Filament Impersonate

Filament Impersonate Laravel Package

stechstudio/filament-impersonate

A Filament plugin that lets admins impersonate users with a single action. Add Impersonate to your resource table or page header, with optional guard and redirect settings.

View on GitHub
Deep Wiki
Context7

Filament Impersonate is a plugin for Filament that makes it easy to impersonate your users. It adds a ready-made action you can drop into your resources, letting admins log in as any user with a single click.

Attach the Impersonate action to your UserResource table or an EditUser page header, and you're done.

  • Table & page actions for one-click impersonation
  • Customizable guards via ->guard()
  • Redirect control with ->redirectTo()
  • SPA-friendly, with ->withoutSpa() for full page loads
Frequently asked questions about Filament Impersonate
How do I install stechstudio/filament-impersonate?
Install it with Composer using composer require stechstudio/filament-impersonate. Then add the Impersonate action to your Filament UserResource table or page header actions. No additional service provider registration is required for the basic setup.
Which Laravel and Filament versions does filament-impersonate support?
The package is optimized for Laravel 10+ and Filament v3+. Some major features require Filament v5.x+ according to the technical assessment. Pin your Filament version in composer.json and test upgrades before deploying.
How do I add an impersonate action to a Filament resource table?
Open your resource class, usually UserResource, and import STS\FilamentImpersonate\Actions\Impersonate. In the table method, add Impersonate::make() to the actions array. This renders a one-click impersonate action for each row.
How do I add impersonation to the EditUser page header in Filament?
In the EditUser page class, override getHeaderActions and return an array containing Impersonate::make()->record($this->getRecord()). This places the impersonate button in the page header for the record being edited. You can also chain guard or redirectTo on that action.
Can I impersonate users with a different auth guard?
Yes. The Impersonate action supports per-action guard overrides, for example Impersonate::make()->guard('sanctum'). For multi-guard applications, set the guard explicitly or validate guard matching in your canImpersonate logic. The package works with Filament's default auth guard as well.
How do I redirect after impersonating a user in Filament?
Chain redirectTo on the action, such as Impersonate::make()->redirectTo(route('some.other.route')). If your Filament panel uses SPA navigation and the redirect target is not Livewire-aware, add withoutSpa() to force a full page load. That avoids broken SPA transitions.
Is stechstudio/filament-impersonate compatible with Laravel Octane?
The package is described as stateless and Octane-compatible, and it does not depend on lab404/laravel-impersonate. It avoids guard registration pitfalls that can affect long-running workers. Still, test it with your specific Octane driver, such as Swoole or FrankenPHP, in staging.
How do I control who can impersonate another user?
Implement canImpersonate() and canBeImpersonated() on your User model to define authorization rules. By default the package allows open impersonation, so misconfigured policies could expose sensitive accounts. Soft-deleted users are blocked by default, but that behavior is configurable via .env.
Do I need to add an impersonation banner outside Filament?
Yes. If your impersonated session visits non-Filament layouts, include the banner component with <x-impersonate::banner/> so users can see and leave impersonation. Otherwise you risk session or UX issues when leaving the Filament panel. Treat this as a critical onboarding step.
Does filament-impersonate log impersonation events for audits?
The package emits EnterImpersonation and LeaveImpersonation events that you can listen for in Laravel. It does not include logging by default, so add your own listener if you need audit trails or compliance records. This is useful for support workflows or regulated environments.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource