PHPackages                             componentk/shopware6-admin-auto-login - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. componentk/shopware6-admin-auto-login

ActiveShopware-platform-plugin[Utility &amp; Helpers](/categories/utility)

componentk/shopware6-admin-auto-login
=====================================

Designed for developer environment Shopware 6 only. Just auto logs in using the default admin user/pass

1.0.1(6mo ago)01MITPHP

Since Oct 30Pushed 6mo agoCompare

[ Source](https://github.com/componentK/shopware6-admin-auto-login)[ Packagist](https://packagist.org/packages/componentk/shopware6-admin-auto-login)[ RSS](/packages/componentk-shopware6-admin-auto-login/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

CKOU Admin Auto Login
=====================

[](#ckou-admin-auto-login)

Auto‑login override for the Shopware 6 Administration login page, intended for local development only.

What It Does
------------

[](#what-it-does)

- On GET to the admin path (e.g. `/admin`), requests an OAuth token using the default credentials `admin` / `shopware`.
- Writes a `bearerAuth` cookie (root path and admin path) and redirects to the Administration dashboard.
- If a valid `bearerAuth` cookie already exists, it does nothing.
- Provides an API endpoint `/api/_action/ckou-auto-login` for manual authentication (useful with admin watcher).

Requirements
------------

[](#requirements)

- Shopware `>= 6.7.0`.
- An admin user with username `admin` and password `shopware` in your dev environment.
- `APP_URL` environment variable set to your base URL (defaults to `http://localhost:8000`).

Install &amp; Activate
----------------------

[](#install--activate)

- Copy this plugin to `custom/plugins/CKOUAdminAutoLogin`.
- Run: `bin/console plugin:refresh`
- Activate: `bin/console plugin:install --activate CKOUAdminAutoLogin`

Usage
-----

[](#usage)

The plugin provides **seamless auto-login** for both standard admin access and the admin watcher (Vite dev server).

### Recommended Workflow (Admin Watcher)

[](#recommended-workflow-admin-watcher)

**The plugin automatically handles everything! Just use port 8000 URLs:**

**Simple access:**

```
http://localhost:8000/admin
→ Auto-login
→ Detects watcher running
→ Redirects to http://localhost:5173/#/sw/dashboard/index

```

**Deep links (hash/path preserved):**

```
http://localhost:8000/admin#/sw/customer/detail/019a24bdea5d71158ac12e3f9ef465be/documents?edit=false
→ Auto-login + cookies set
→ Redirects to http://localhost:5173/#/sw/customer/detail/019a24bdea5d71158ac12e3f9ef465be/documents?edit=false
→ Exact page loaded with authentication

```

**Pro tip**: Bookmark your favorite admin URLs as `localhost:8000/admin#/path` and they'll automatically redirect to the watcher!

### Direct Watcher Access (After First Visit)

[](#direct-watcher-access-after-first-visit)

Once you've visited `localhost:8000/admin` once in your browser session, you can use watcher URLs directly:

- `http://localhost:5173/#/sw/customer/...` works immediately
- Cookies persist across both ports
- No need to go through localhost:8000 again until cookies expire

### Standard Admin (No Watcher)

[](#standard-admin-no-watcher)

If the admin watcher is not running, the plugin works as a simple auto-login:

- Navigate to `http://localhost:8000/admin`
- Automatically logged in and redirected to dashboard

### How It Works

[](#how-it-works)

Simple and clean **pure PHP backend** approach:

1. **Intercepts `/admin` Requests**:

    - Listens for GET requests to `/admin` path
    - Issues OAuth tokens using `admin` / `shopware` credentials
    - Sets `bearerAuth` cookies for `localhost` domain (works on all ports)
2. **Admin Watcher Detection**:

    - Reads `ADMIN_PORT` environment variable (defaults to 5173)
    - Tests if admin watcher is running by checking port accessibility
    - If detected, generates HTML redirect; otherwise, standard HTTP redirect
3. **Hash Preservation**:

    - Uses client-side JavaScript to read `window.location.hash`
    - Redirects to watcher URL with hash intact
    - Deep links work perfectly: `localhost:8000/admin#/sw/customer/...` → `localhost:5173/#/sw/customer/...`
4. **Cookie Compatibility**:

    - `SameSite=LAX` allows cookies across different ports
    - Once set, cookies persist for both `:8000` and `:5173`
    - No additional API calls or user action required

Safety Note
-----------

[](#safety-note)

- This plugin is for development only. Do not use in production.

Uninstall
---------

[](#uninstall)

- `bin/console plugin:uninstall CKOUAdminAutoLogin`

License
-------

[](#license)

- MIT. See `LICENSE` file.
- generated with AI assistance.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance72

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

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

Every ~3 days

Total

2

Last Release

186d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/73f2a89b167c73f26795d2ddb031cf27111abda491e34387331ddea5f90ed43d?d=identicon)[componentk](/maintainers/componentk)

---

Top Contributors

[![augsteyer](https://avatars.githubusercontent.com/u/844601?v=4)](https://github.com/augsteyer "augsteyer (2 commits)")

### Embed Badge

![Health badge](/badges/componentk-shopware6-admin-auto-login/health.svg)

```
[![Health](https://phpackages.com/badges/componentk-shopware6-admin-auto-login/health.svg)](https://phpackages.com/packages/componentk-shopware6-admin-auto-login)
```

###  Alternatives

[frosh/tools

Provides some basic things for managing the Shopware Installation

79709.7k2](/packages/frosh-tools)[frosh/development-helper

Development Helper

90286.1k](/packages/frosh-development-helper)[shopware-pwa/shopware-pwa

Shopware PWA extension

4074.0k](/packages/shopware-pwa-shopware-pwa)[swag/migration-assistant

Migration plugin for shopware/platform

2036.3k](/packages/swag-migration-assistant)[werkstattl/openblogware

OpenBlogware: A Blog Module for Shopware 6.

415.7k](/packages/werkstattl-openblogware)[frosh/product-compare

A Simple Product Compare plugin for Shopware 6

4032.8k](/packages/frosh-product-compare)

PHPackages © 2026

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