# vaimo/module-admin-auto-login

> Provides automatic admin login on Magento projects; Useful addition when working with a project locally (should be used only as require-dev)

`composer require vaimo/module-admin-auto-login`

Canonical URL: https://packagento.com/vaimo/module-admin-auto-login

## At a glance

- **Vendor**: Vaimo (https://packagento.com/vaimo.md)
- **Latest version**: 1.4.5 — released 2022-06-02
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/vaimo/module-admin-auto-login and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require vaimo/module-admin-auto-login:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Provides automatic admin login on Magento projects; Useful addition when working with a project locally (should be used only as require-dev)

## README

[![Latest Stable Version](https://poser.pugx.org/vaimo/module-admin-auto-login/v/stable)](https://packagist.org/packages/vaimo/module-admin-auto-login)
[![Total Downloads](https://poser.pugx.org/vaimo/module-admin-auto-login/downloads)](https://packagist.org/packages/vaimo/module-admin-auto-login)
[![Daily Downloads](https://poser.pugx.org/vaimo/module-admin-auto-login/d/daily)](https://packagist.org/packages/vaimo/module-admin-auto-login)
[![License](https://poser.pugx.org/vaimo/module-admin-auto-login/license)](https://packagist.org/packages/vaimo/module-admin-auto-login)

This module bypasses the admin panel login screen, automatically logging in as
the user provided in the configuration. Since it doesn't run any validations,
this module should be used only on local environments (i.e.: not public).

### Installation

    composer require --dev vaimo/module-admin-auto-login
    php bin/magento module:enable Vaimo_AdminAutoLogin
    php bin/magento setup:upgrade

### Usage

Access the admin URL for the project. You should be logged in automatically.

### Configuration

You can change the user to login in `Stores` > `Settings` > `Configuration` >
`Advanced` > `Admin` > `Admin Auto Login`.

If no username is assigned in the admin pages, it will fallback to `jambi` or
`admin` (in that order). If none of those are available, it will fallback to the
first user it finds.

### Support

Support will be provided on a best efforts basis through [GitHub Issues](1).
Pull requests are welcome.

 [1]: https://github.com/vaimo/module-admin-auto-login/issues

## Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

### [Unreleased]

### [1.4.5] - 2022-06-02
#### Fixed

- Fix Magento Framework version requirements in composer.json to make module possibly to require with M2.4.x

### [1.4.4] - 2022-05-06
#### Added

- Disable password changing request if module is active
- Handle "There are no admin users to attempt login to." error more gracefully

### [1.4.3] - 2022-05-03
#### Added 

- Support for Magento 2.4.x 

### [1.4.2] - 2019-03-28
#### Fixed

- Allow the module to be installed on 2.3 (https://github.com/vaimo/module-admin-auto-login/issues/4)

### [1.4.1] - 2018-07-24
#### Fixed

- Keep URL parameters on redirect ([by @roman-snitko](https://github.com/vaimo/module-admin-auto-login/pull/3))

### [1.4.0] - 2017-11-09
#### Added

- Support for Magento 2.2

### [1.3.0] - 2017-05-08
#### Added
- Public release
- Changelog
- Do not redirect back to dashboard after session expiration

[Unreleased]: https://github.com/vaimo/module-admin-auto-login/compare/v1.3.0...HEAD

## Recent Versions

| Version | Released |
|---|---|
| 1.4.5 | 2022-06-02 |
| 1.4.4 | 2022-05-06 |
| 1.4.3 | 2022-05-03 |
| 1.4.2 | 2019-03-28 |
| 1.4.1 | 2018-07-24 |
| 1.4.0 | 2017-11-09 |
| 1.3.0 | 2017-05-08 |

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magento/framework | 100.* \| 101.* \| 102.* \| 103.* |

## Quality

Latest release (1.4.5) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 3 | 3 warnings (ruleset: Magento2) — 2 auto-fixable with phpcbf |
| PHPMD | Warning | 7 | 7 rule violations (UnusedFormalParameter:4, MissingImport:3) |
| Cpd | Pass | 0 |  |
| Composer validate | Pass | 0 |  |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 7 | 7 | – | – |
| 2.4.8 | – | 7 | 7 | – |
| 2.4.9 | – | – | 7 | 7 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["vaimo/module-admin-auto-login"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

Vaimo is a Magento 2 vendor on Packagento. See https://packagento.com/vaimo.md for their full catalogue.

