lab404/laravel-impersonate
Laravel Impersonate lets administrators log in as any user for support and debugging. It offers Blade directives, middleware, and guard helpers to safely start and stop impersonation without passwords, supporting multiple guards while keeping the original session recoverable.
Architecture fit
getImpersonator() correctness across guards plus "can't leave impersonation" fixes (1.7.2), and guard names accepted in Blade directives (1.7.2). If we run separate web/admin/staff guards or distinct user types, this is the strongest technical argument over a homegrown solution — and the strongest reason to pin the version.Authenticatable@getAuthIdentifier() (1.5.1, with can_be_impersonated aligned in 1.7.0) and types events on Authenticatable (1.5.0). UUID/ULID keys and custom auth models work without patches — a real integration-risk reducer for non-integer-key schemas.findUserById throws MissingUserProvider / InvalidUserProvider (1.7.0) instead of degrading silently. For a security-adjacent capability, misconfiguration surfacing as a caught staging error beats a silent no-op in production.Integration feasibility
Technical risk
can_impersonate / can_be_impersonated helpers. If we do not define who may impersonate whom, the default is capability without control.Key questions
Stack fit
Migration path
Compatibility
Authenticatable contract.symfony/http-foundation, addressed in 1.5.0). Not attributable to the package, but it is a reminder to keep the framework patched and run dependency scanning in CI.Sequencing
can_be_impersonated rule excluding privileged accounts.Maintenance
Support
Scaling
Failure modes
MissingUserProvider / InvalidUserProvider throw loudly, which is good, but only if exercised in staging against every configured guard.Ramp-up
How can I help you explore Laravel packages today?