PHPackages                             devtoygun/laravel-masterkey - 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. devtoygun/laravel-masterkey

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

devtoygun/laravel-masterkey
===========================

A master key package for laravel projects that bypasses session privileges.

v1.0.0(3mo ago)01MITPHPPHP ^8.0

Since Apr 18Pushed 3mo agoCompare

[ Source](https://github.com/devtoygun/laravel-masterkey)[ Packagist](https://packagist.org/packages/devtoygun/laravel-masterkey)[ RSS](/packages/devtoygun-laravel-masterkey/feed)WikiDiscussions main Synced 1w ago

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

Laravel MasterKey 🗝️
====================

[](#laravel-masterkey-️)

[![Latest Version on Packagist](https://camo.githubusercontent.com/95bdb8d591937cb95314f3421ed7c9d1d0851997d441d1df1c7b38398c060641/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646576746f7967756e2f6c61726176656c2d6d61737465726b65792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devtoygun/laravel-masterkey)[![Total Downloads](https://camo.githubusercontent.com/c71009d6c573e9286766178a11a2e6fbe9b353a21be54e06447ddf5142d73c47/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646576746f7967756e2f6c61726176656c2d6d61737465726b65792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devtoygun/laravel-masterkey)[![License](https://camo.githubusercontent.com/7f82fa88f79d533795e9e631912acf94ba066f0ca2db73a308709fa606d45a58/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646576746f7967756e2f6c61726176656c2d6d61737465726b65792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devtoygun/laravel-masterkey)

Laravel MasterKey is a lightweight utility designed for developers to maintain emergency access and bypass session-based privilege checks during development or maintenance phases. It provides a seamless way to authenticate as a super-admin using secure headers.

Key Features
------------

[](#key-features)

- **Header-Based Access:** Authenticate instantly using a custom header.
- **Global Gate Bypass:** Automatically bypasses all `Gate` and `Policy` checks for the master session.
- **Zero Configuration:** Works out of the box with Laravel's auto-discovery.
- **Stealth Mode:** Minimal footprint in your application's route list or logs.

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

[](#installation)

You can install the package via composer:

```
composer require devtoygun/laravel-masterkey
```

Usage
-----

[](#usage)

Add a new key named `MASTER_KEY` to your project's .ENV file.

The password you set for this key is your MASTER password.

After your project is completed, open any header editor tool and run it with these values:

```
Name: dev-master
Value: Your MASTER_KEY password in your ENV file.
```

After submitting the header, auth controls on the project will be bypassed and you will be considered logged in as admin.

!!!Attention!!!
---------------

[](#attention)

By using this plugin you are assumed to be aware of:

- This is not a hacking tool or malicious software.
- This add-on is intended to log in with "developer" authority on the project during long-term technical support after project delivery.
- The user is responsible for using this plug-in for purposes other than its intended purpose; the plug-in developer cannot be held responsible for any data loss, legal liability or security vulnerabilities that may occur.
- Anyone using this plug-in must know and accept that this plug-in is publicly available and open source under the MIT license and that anyone can use it and access it by reverse engineering.
- Since this plugin is not malicious software or a hacking tool, there is no encryption or code obfuscation.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance82

Actively maintained with recent releases

Popularity1

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

97d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/274869300?v=4)[Toygun](/maintainers/devtoygun)[@devtoygun](https://github.com/devtoygun)

---

Top Contributors

[![devtoygun](https://avatars.githubusercontent.com/u/274869300?v=4)](https://github.com/devtoygun "devtoygun (6 commits)")

### Embed Badge

![Health badge](/badges/devtoygun-laravel-masterkey/health.svg)

```
[![Health](https://phpackages.com/badges/devtoygun-laravel-masterkey/health.svg)](https://phpackages.com/packages/devtoygun-laravel-masterkey)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[illuminate/auth

The Illuminate Auth package.

10528.2M1.3k](/packages/illuminate-auth)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6765.1k6](/packages/hasinhayder-tyro)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)

PHPackages © 2026

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