Download the PHP package genaker/free-admin without Composer
On this page you can find all versions of the php package genaker/free-admin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download genaker/free-admin
More information about genaker/free-admin
Files in genaker/free-admin
Package free-admin
Short Description Magento 2 module that allows free admin login when env.php backend => auth = false
License MIT
Informations about the package free-admin
Genaker FreeAdmin Module
Overview
This module allows free admin login when the Magento_Backend module is disabled in app/etc/config.php.
How It Works
The module uses a before plugin on Magento\Backend\Model\Auth::login() method to:
- Security Check: Never bypass authentication in production mode
- Check if
Magento_Backendmodule is disabled using Magento'sModuleListandDeploymentConfigclasses - If disabled AND not in production mode, bypass normal authentication by:
- First trying to find admin user by the provided email/username
- If not found, falling back to the first available admin user
- If enabled or in production mode, proceed with normal authentication
Installation
Method 1: Manual Installation
- Copy the module to
app/code/Genaker/FreeAdmin/ -
Enable the module:
- Run setup:
Method 2: Composer Installation
-
Add the module to your project's
composer.json: -
Install via Composer:
- Run setup:
Usage
To Enable Free Admin Access:
-
Set
backend/authtofalsein your deployment configuration (e.g.,app/etc/env.php): -
Clear caches:
- Now any username/password combination will work for admin login
To Disable Free Admin Access:
-
Set
backend/authtotrueor remove the configuration in your deployment configuration: - Clear caches:
Security Warning
⚠️ IMPORTANT: This module is for development/testing purposes only.
- Never bypasses authentication in production mode - additional safety measure
- It bypasses authentication when enabled by using existing admin users
- Requires at least one admin user to exist in the system
- Only works in development or default modes
Module Structure
Troubleshooting
Module Not Working
- Check if module is enabled:
php bin/magento module:status Genaker_FreeAdmin - Verify plugin is loaded:
php bin/magento setup:di:compile - Clear caches:
php bin/magento cache:flush - We need also disable TWO FACTOR Auth modules
Customization
To modify the authentication bypass logic, edit SimpleLoginPlugin.php in the beforeLogin method.
Support
For issues or questions, check the module logs or contact the development team.
All versions of free-admin with dependencies
magento/module-backend Version >=100.0.0
magento/module-user Version >=100.0.0