victoryoalli/laravel-multitenancy-impersonate
Laravel package for impersonating users in multi-tenant applications. Let admins act as a tenant user while keeping tenant context and isolation intact, with simple start/stop impersonation flows for support, debugging, and administration.
CanImpersonate gate, ImpersonateToken, configurable rate limiting, and documented security considerations give you an auditable, revocable mechanism rather than ad-hoc Auth::loginUsingId() calls scattered through the codebase — useful evidence for SOC 2 / ISO access-control controls.laravel-multitenancy-impersonate-development) that feeds Claude and compatible editors accurate guidance on CanImpersonate, ImpersonateToken, config keys, rate limiting, security, and testing patterns. This lowers the cost of the first implementation and reduces the chance of engineers misusing the impersonation primitives — a real, if modest, adoption argument for teams already using AI-assisted development.Consider adopting when:
Look elsewhere or build in-house when:
To executives: This is a small, focused dependency that unlocks a high-demand support capability — letting authorised staff securely view a customer's account as that customer, correctly scoped to their tenant. It replaces what would otherwise be bespoke, security-sensitive code with a maintained package that has explicit permission checks, tokenised sessions, and rate limiting. The practical upside is faster ticket resolution and a cleaner story in security questionnaires about how staff access customer data. Cost is low; the main diligence item is the package's maintenance profile.
To engineering: Adopt it rather than hand-rolling tenant-aware impersonation. You get a CanImpersonate authorisation contract, an ImpersonateToken flow, configurable rate limits, and documented security and testing patterns. v2.3.0 adds a Laravel Boost skill so AI-assisted editors generate code against the real API — CanImpersonate, ImpersonateToken, config keys, rate limiting, and test patterns — which cuts integration time and reduces misuse. Recommended path: pin the version, gate impersonation behind an explicit policy, log every impersonation event in your own audit table, and write feature tests around tenant boundaries before shipping to support staff.
How can I help you explore Laravel packages today?