xlite-dev/filament-impersonate
Filament plugin to switch between accounts without signing out. Supports linked accounts, impersonation with a switch-back banner, and environment-gated developer logins, plus an audit trail and a fluent per-panel API. Formerly xlite-dev/filament-impersonate.
composer require plus a trait and a plugin registration. The buy decision is easy; the harder call is whether you accept a 46-star, zero-dependent dependency for an auth-adjacent surface.local by default and rendered outside the panel's control, so it's a safe default-on for dev environments. Treat it as a DX freebie, not a roadmap item.account_switches table (actor, target, reason, panel, guard, IP, user agent) plus AccountSwitching/AccountSwitched events gives you "who accessed whose account and why" out of the box. If a customer or auditor is already asking that question, this package converts an open roadmap item into a shipped one. If they aren't asking yet, it's the cheapest way to be ready before they do.impersonation(), linkedAccounts(), developerLogins(), canImpersonateUsing(), canSwitchUsing()) lets you enable one capability on one internal panel, measure, then expand. That's a real de-risking lever: you can run impersonation in support without touching the linked-accounts model that changes how admins log in.Missing parameter: tenant on registration pages) and per-panel feature toggles mean this fits an app where different panels have different trust levels — e.g. impersonation on the internal ops panel, disabled on the customer-facing one.Consider it when:
Look elsewhere or build when:
lab404/laravel-impersonate (which this package explicitly dropped as a dependency) plus your own audit table is a better fit.xlite-dev/filament-impersonate → packstub/filament-account-switcher, full namespace change, config file rename, route changes) is exactly the kind of breakage that costs an afternoon. If you can't absorb that, pin the version and accept the fork cost later.For executives — one paragraph: "We can ship support impersonation, admin privilege tiering, and an access audit log in about a day instead of a quarter. The package is MIT-licensed, actively maintained, and already covers the security story we'd otherwise have to design and defend: switching up to an admin account requires that account's password, so a compromised day-to-day session can't reach admin on its own, and every switch is recorded with who, to whom, why, when, and from where. The risk is small and bounded — if the maintainer walks away, we own the source and can fork it. The bigger risk is not having this: right now our support team either can't see what customers see, or gets there by sharing passwords, and neither is a story we want to tell in a security review."
For engineering — the ask:
composer require packstub/filament-account-switcher, run the install command, add HasLinkedAccounts to User, register AccountSwitcherPlugin on the internal panel only.canImpersonate() / canBeImpersonated() on the model — this is the only real design work. Be conservative: super-admins only, never other super-admins, explicit deny-list for billing/owner accounts.AccountSwitched event into your existing logging. Don't build a second viewer.UPGRADE.md before any bump — 4.x renamed the namespace and rewrote the session core.For support/success leads — what changes for them: One-click Impersonate from the users table, an always-visible banner so nobody forgets they're someone else, and a Switch back button that always works. No more "can you send me a screenshot of your screen." The audit log also means the team can point to a record when a customer asks "who looked at my account" — that turns a defensive conversation into a one-line answer.
The honest caveats to put in the same slide: Zero dependent packages and a 46-star count mean we are early adopters, not followers. That's acceptable for an internal admin tool with a fork escape hatch, and unacceptable if this ever needs to be a customer-facing, contractually-warranted capability. Decide which one it is before the pilot, not after.
How can I help you explore Laravel packages today?