PHPackages                             unikka/login-as - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. unikka/login-as

ActiveNeos-plugin[Authentication &amp; Authorization](/categories/authentication)

unikka/login-as
===============

Plugin for the Neos CMS that enables users to login with other accounts for support reasons e.g.

v3.0.2(2y ago)1317.5k4[3 issues](https://github.com/Unikka/login-as/issues)GPL-3.0-or-laterJavaScript

Since Jun 4Pushed 2y agoCompare

[ Source](https://github.com/Unikka/login-as)[ Packagist](https://packagist.org/packages/unikka/login-as)[ GitHub Sponsors](https://github.com/markusguenther)[ Patreon](https://www.patreon.com/unikka)[ RSS](/packages/unikka-login-as/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (2)Versions (19)Used By (0)

 [![](https://camo.githubusercontent.com/63cdbe11628399f4564ae03d9985774c1bd110e532b547b909ff862601dec168/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f756e696b6b612f756e696b6b612e64652f7372632f6173736574732f756e696b6b615f776974685f6261636b67726f756e642e737667)](https://camo.githubusercontent.com/63cdbe11628399f4564ae03d9985774c1bd110e532b547b909ff862601dec168/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f756e696b6b612f756e696b6b612e64652f7372632f6173736574732f756e696b6b615f776974685f6261636b67726f756e642e737667)

[![Packagist](https://camo.githubusercontent.com/b2c4acd2bb502e15ac61e7465f907621b84e2b43b617a05d5bc69ca5c39d7a46/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f756e696b6b612f6c6f67696e2d61732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/unikka/login-as)[![Code Climate maintainability](https://camo.githubusercontent.com/dac318814952fd25880e12395a1c632ee09c7fa016d86896d976970064cf76bd/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6d61696e7461696e6162696c6974792d70657263656e746167652f556e696b6b612f6c6f67696e2d6173)](https://camo.githubusercontent.com/dac318814952fd25880e12395a1c632ee09c7fa016d86896d976970064cf76bd/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6d61696e7461696e6162696c6974792d70657263656e746167652f556e696b6b612f6c6f67696e2d6173)[![Packagist](https://camo.githubusercontent.com/5529b3b09acaa6e810917d2ca9606684aa6dd605e3aae8e45cfcee9c704066a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f756e696b6b612f6c6f67696e2d61732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/unikka/login-as)[![semantic-release](https://camo.githubusercontent.com/5f3b57745af83409bc673dec57e3eb360e1ec53b37ac29f81a319e347fa351c6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2532302532302546302539462539332541362546302539462539412538302d73656d616e7469632d2d72656c656173652d6531303037392e737667)](https://github.com/semantic-release/semantic-release)

Important
=========

[](#important)

With Neos 8.0 this package became part of the core. So just use it with Neos 7.3 or below.

LoginAs package
===============

[](#loginas-package)

With this Neoscms package it is possible to change the identity of the logged in user. It has certainly happened that an editor has called you and described an error that they themselves can not understand.

With this package you can extend your neos so that you can simply log in as this user. Completely without resetting passwords.

[![Introduction Video](https://camo.githubusercontent.com/d488441b3830545a62959139e6237a970e527dc52c6edf7fdd1f00fe49d07557/687474703a2f2f696d672e796f75747562652e636f6d2f76692f5f7756334f43594f7150732f302e6a7067)](http://www.youtube.com/watch?v=_wV3OCYOqPs "UNIKKA LoginAs")

Thanks ❤️
---------

[](#thanks-heart)

The package is based on a pull request from Dominique Feyer (@dfeyer). We are thankful for the basis. The customization of the Neos backend was sponsored by the [VisionConnect GmbH](https://www.visionconnect.de/) agency. I hereby thank you very much for the financial support and for the permission to open source the whole adjustment.

Installation
------------

[](#installation)

```
composer require unikka/login-as --no-update
```

The --no-update command prevents the automatic update of the dependencies. After the package was added to your theme `composer.json`, go back to the root of the Neos installation and run composer update. Your desired package is now installed correctly.

Usage
-----

[](#usage)

The package can be used in three different ways. The easiest and probably most common way is to use it in the Neos backend.

### Neos Backend

[](#neos-backend)

For this, you only have to log in to the Neos backend as an administrator and can then select another user in the user management. Since the users can have different permissions on modules, the page is reloaded and you are redirected to the default module of the user.

[![User management module with new actions](https://user-images.githubusercontent.com/1014126/110189031-1ddbe100-7e1e-11eb-8d24-7ac4ca8dd0aa.png)](https://user-images.githubusercontent.com/1014126/110189031-1ddbe100-7e1e-11eb-8d24-7ac4ca8dd0aa.png)

You can now act as this user. When your work is done you can open the user menu on the top right and authenticate as yourself again with the "Back to user" button.

[![Extended user menu with switch back button](https://user-images.githubusercontent.com/1014126/110189033-1fa5a480-7e1e-11eb-95de-db14520e3065.png)](https://user-images.githubusercontent.com/1014126/110189033-1fa5a480-7e1e-11eb-95de-db14520e3065.png)

Again, the page will reload and you will find yourself in the user's default module. It could be a possible feature in the future to have this behavior configurable.

The user menu has been extended in two places. In the content module, the new React UI is almost always used. For this, a plugin is included to extend the menu. However, in most of the backend modules, there is no React component yet. Therefore, the menu is adapted here again extra.

If you are still using the old EmberJS based UI, you will not automatically have the "Switch back" button in the content module. For this please have a look at the Troubeshot section!

### Controller actions

[](#controller-actions)

Now, of course, it may be that the backend is not of interest to them at all. For example, because they have built up a community and have so-called front-end users for this. Here, too, it can sometimes be useful if you can log in as another user.

For this case we provide ControllerActions.

- impersonate: arguments `account` \[Account\]
- restore
- status

With the help of these actions you can customize your application to search for users and then pass the found account as a parameter to the impersonateAction.

### Endpoints

[](#endpoints)

In the third variant, you can use the function provided from the backend. The backend uses routes that are provided by the package.

These routes provide API endpoints and can be used with a small JavaScript package.

If you are not in the backend you have to define your own routes. You may also need to adjust the policies for the impersonate action (if you don't use an administrator). For the routes it could look like this.

```
-
  name: 'Impersonate User status'
  uriPattern: 'mypackage/impersonate/status'
  defaults:
    '@package': 'Unikka.LoginAs'
    '@controller': 'Impersonate'
    '@action': 'status'
    '@format': 'json'
  httpMethods: ['GET']

```

If everything is configured correctly, you should receive a JSON response for the status endpoint, for example.

```
{
  "status": true,
  "user": {
    "accountIdentifier": "test-admin",
    "fullName": "Test Admin"
  },
  "origin": {
    "accountIdentifier": "admin",
    "fullName": "Markus Günther"
  }
}

```

To make things a bit easier in the JavaScript application you can use the API services from the backend. For this you can install the following package.

```
yarn add @unikka/loginas-api
```

In your own application you only have to import the ApiService and pass the appropriate base-uri and a CSFR token to the service.

```
import ApiService from '@unikka/loginas-api'

const { csrfToken } = document.getElementById('some-container').dataset
new ApiService('mypackage/impersonate/', csrfToken)
    .callStatus()
    .then((data) => {
        const { status } = data
        console.log(status)
    })
```

Configuration
-------------

[](#configuration)

If you use Variant 2 with the predefined controller actions, you can configure where you want to be forwarded after a change of the user. You can define redirections in case a user is logged in or restored.

```
Unikka:
  LoginAs:
    redirectOptions:
      restore:
        action: 'myAction'
        controller: 'myController'
        package: 'mypackage'
      impersonate:
        action: 'myAction'
        controller: 'myController'
        package: 'mypackage'
```

This does not work for the other options yet!

Contribution
------------

[](#contribution)

We'd love you to contribute to LoginAs. We try to make it as easy as possible. We are using semantic versioning to have more time to concentrate on important stuff instead of struggling in the dependency or release hell.

Therefore the first rule is to follow the [eslint commit message guideline](https://github.com/conventional-changelog-archived-repos/conventional-changelog-eslint/blob/master/convention.md). It is really easy if you always commit via `yarn commit`. Commitizen will guide you.

All PRs will be merged into the master branch. Travis and semantic release will check the commit messages and start building a new release when the analysis of the latest commits will trigger that.

If you have questions just ping us on Twitter or Github.

License
-------

[](#license)

The GNU GENERAL PUBLIC LICENSE. Please see [License File](LICENSE) for more information.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 80.2% 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

Every ~83 days

Recently: every ~223 days

Total

15

Last Release

1042d ago

Major Versions

v1.2.2 → v2.0.02021-03-06

v1.2.3 → v2.0.22021-03-09

v2.0.3 → v3.0.02022-07-29

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12020496?v=4)[unikka](/maintainers/unikka)[@Unikka](https://github.com/Unikka)

---

Top Contributors

[![markusguenther](https://avatars.githubusercontent.com/u/1014126?v=4)](https://github.com/markusguenther "markusguenther (69 commits)")[![semantic-release-bot](https://avatars.githubusercontent.com/u/32174276?v=4)](https://github.com/semantic-release-bot "semantic-release-bot (14 commits)")[![Kleisli](https://avatars.githubusercontent.com/u/18674199?v=4)](https://github.com/Kleisli "Kleisli (3 commits)")

---

Tags

hacktoberfestimpersonateneosneoscmsphpsuperuser

### Embed Badge

![Health badge](/badges/unikka-login-as/health.svg)

```
[![Health](https://phpackages.com/badges/unikka-login-as/health.svg)](https://phpackages.com/packages/unikka-login-as)
```

###  Alternatives

[sandstorm/neostwofactorauthentication

1225.7k](/packages/sandstorm-neostwofactorauthentication)[flowpack/neos-frontendlogin

Neos plugin demonstrating a simple frontend login

22223.4k1](/packages/flowpack-neos-frontendlogin)[sandstorm/usermanagement

Neos and Flow package for user management, login/logout, password reset and user activation

3728.7k](/packages/sandstorm-usermanagement)[sandstorm/neosacl

1561.8k](/packages/sandstorm-neosacl)[punktde/editconflictprevention

Prevents edit conflicts when multiple editors are working on the site by either warn the user or deny editing.

1430.6k](/packages/punktde-editconflictprevention)

PHPackages © 2026

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