PHPackages                             skywalker-labs/impersonate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. skywalker-labs/impersonate

ActiveLibrary[Testing &amp; Quality](/categories/testing)

skywalker-labs/impersonate
==========================

A powerful Laravel package to authenticate as your users. Easily impersonate other users in your application with a simple trait. Includes features like Blade directives, event handling, multi-guard support, and customizable access controls for advanced user management and debugging.

v1.0.0(4mo ago)4328[1 issues](https://github.com/skywalker-labs/impersonate/issues)MITPHPPHP ^7.2 | ^8.0

Since Feb 15Pushed 4mo agoCompare

[ Source](https://github.com/skywalker-labs/impersonate)[ Packagist](https://packagist.org/packages/skywalker-labs/impersonate)[ RSS](/packages/skywalker-labs-impersonate/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

🎭 Laravel Impersonate: Pro Stealth
==================================

[](#-laravel-impersonate-pro-stealth)

### *Switch Users with Elite Precision and Zero-Config UI Injection*

[](#switch-users-with-elite-precision-and-zero-config-ui-injection)

[![Latest Version](https://camo.githubusercontent.com/bf65f4faf0e1e68873a5906c69eedf731b6a1554f8883920e71e04521ca619c8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e302d676f6c642e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/skywalker-labs/impersonate)[![Laravel Version](https://camo.githubusercontent.com/d06588c2f08e749de25013042b2a4be3debdc7e37f1e72c7859297a66120ad7d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322e782d7265642e7376673f7374796c653d666f722d7468652d6261646765)](https://laravel.com)[![PHP Version](https://camo.githubusercontent.com/041b337018604c385c2a271c2ff4ef3cd821caabfbe89a40aca5a86cfdf2a727/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e342b2d3737376262342e7376673f7374796c653d666f722d7468652d6261646765)](https://php.net)[![UI Status](https://camo.githubusercontent.com/039e376ea213518d54850d047b3afb2be9f4e789f4597c84a962c42e9ccacf47/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f55492d4175746f6d617469635f496e6a656374696f6e2d677265656e2e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/skywalker-labs/impersonate)

---

**Laravel Impersonate Pro** is the ultimate developer tool for troubleshooting user issues. It allows you to step into your users' shoes without knowing their passwords, while maintaining absolute security and a seamless audit trail.

✨ Why Pro Impersonate?
----------------------

[](#-why-pro-impersonate)

Most impersonation packages are "dumb"—they just swap session IDs. Our **Elite Architect** approach ensures:

- 🤫 **Quiet Auth:** Impersonate without triggering "Login" events or updating `last_login_at` (Optional).
- 🍪 **Persistent Persona:** Remembers your admin state even if the impersonated user's session expires.
- 💉 **Auto-UI Injection:** A sleek, non-intrusive floating bar appears only during impersonation.
- 🛡️ **TTL Guards:** Set a time-to-live for impersonation sessions to prevent "Forgot to Leave" security leaks.

---

🔥 Killer Features
-----------------

[](#-killer-features)

### 1. Multi-Guard Support

[](#1-multi-guard-support)

Seamlessly switch between `web`, `admin`, or custom guards without losing context.

### 2. Blade Directives for Elite DX

[](#2-blade-directives-for-elite-dx)

```
@impersonating

        You are currently viewing as {{ Auth::user()->name }}.
        Return to Admin

@endImpersonating
```

### 3. Integrated Audit Logging

[](#3-integrated-audit-logging)

Never guess who did what. Our package logs every impersonation cycle with ID, IP, and timestamps.

---

⚡ Performance &amp; Security
----------------------------

[](#-performance--security)

FeatureIndustry StandardSkywalker Elite**Logic Conflict**High (Session overriding)**Low (Stealth Session Separation)****UI Setup**Manual Views**Zero-Config Injection****Security**Simple Guard Check**Multi-factor Gate Protection**---

🛠️ Elite Implementation (PHP 8.4+)
----------------------------------

[](#️-elite-implementation-php-84)

### Take Control

[](#take-control)

Start impersonation with high-level API:

```
public function loginAs(User $user): bool
{
    return impersonate()->take(
        from: auth()->user(),
        to: $user,
        guardName: 'web'
    );
}
```

### Global Middleware Protection

[](#global-middleware-protection)

```
// app/Http/Kernel.php
protected $middlewareGroups = [
    'web' => [
        \Skywalker\Impersonate\Middleware\ProtectFromImpersonation::class,
    ],
];
```

---

🛡️ Enterprise Privacy
---------------------

[](#️-enterprise-privacy)

- **Encrypted Session Keys:** Impersonation tokens are salted and rotated.
- **Event-Driven Hooks:** Fire internal webhooks when a support agent starts an impersonation session.
- **Auto-Cleanup:** Automatically clears impersonation data on master logout.

---

Created &amp; Maintained by **Skywalker-Labs**. Built for Developers, Trusted by Admins.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance69

Regular maintenance activity

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

140d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/68241409c48fd5184c979320937b363826a5a9aeeb4260e8d1fa753be39458b9?d=identicon)[ermradulsharma](/maintainers/ermradulsharma)

---

Top Contributors

[![ermradulsharma](https://avatars.githubusercontent.com/u/15956546?v=4)](https://github.com/ermradulsharma "ermradulsharma (7 commits)")

---

Tags

plugintestinglaravelpackagesecurityauthAuthenticationdebugginguserimpersonationimpersonatedeveloper-toolsskywalker-labslogin-asuser-switching

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/skywalker-labs-impersonate/health.svg)

```
[![Health](https://phpackages.com/badges/skywalker-labs-impersonate/health.svg)](https://phpackages.com/packages/skywalker-labs-impersonate)
```

###  Alternatives

[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k18.6M64](/packages/lab404-laravel-impersonate)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k42.5M41.1k](/packages/orchestra-testbench)[rickycezar/laravel-jwt-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

25125.2k](/packages/rickycezar-laravel-jwt-impersonate)[hotmeteor/spectator

Testing helpers for your OpenAPI spec

3051.6M1](/packages/hotmeteor-spectator)[lab404/laravel-auth-checker

Laravel Auth Checker allows you to log users authentication, devices authenticated from and lock intrusions.

225167.3k2](/packages/lab404-laravel-auth-checker)[hapidjus/laravel-impersonate-ui

UI for 404labfr/laravel-impersonate

371.6k](/packages/hapidjus-laravel-impersonate-ui)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
