PHPackages                             agile-creative-minds/laravel-dev-login-link - 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. agile-creative-minds/laravel-dev-login-link

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

agile-creative-minds/laravel-dev-login-link
===========================================

Dev-only magic login link command for Laravel

v0.1.0(3mo ago)00MITPHPPHP ^8.2CI passing

Since Feb 5Pushed 3mo agoCompare

[ Source](https://github.com/Agile-Creative-Minds/laravel-dev-login-link)[ Packagist](https://packagist.org/packages/agile-creative-minds/laravel-dev-login-link)[ RSS](/packages/agile-creative-minds-laravel-dev-login-link/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (7)Versions (2)Used By (0)

Laravel Dev Login Link
======================

[](#laravel-dev-login-link)

[![Latest Version](https://camo.githubusercontent.com/6da118794b54407e302d38e10ccd6276728a4ba05f504a126dc76f9b69d8cfd9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6167696c652d63726561746976652d6d696e64732f6c61726176656c2d6465762d6c6f67696e2d6c696e6b2e7376673f6c6162656c3d76657273696f6e)](https://packagist.org/packages/agile-creative-minds/laravel-dev-login-link)[![Packagist Downloads](https://camo.githubusercontent.com/9b74a47a7fd2f2baabca22c5c436ec224f230d019432d61cc25d1dd602922ab8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6167696c652d63726561746976652d6d696e64732f6c61726176656c2d6465762d6c6f67696e2d6c696e6b2e7376673f6c6162656c3d646f776e6c6f616473)](https://packagist.org/packages/agile-creative-minds/laravel-dev-login-link)[![CI](https://github.com/Agile-Creative-Minds/laravel-dev-login-link/actions/workflows/ci.yml/badge.svg)](https://github.com/Agile-Creative-Minds/laravel-dev-login-link/actions)[![License](https://camo.githubusercontent.com/b657c1b9669bd5d7c0e10d37b8680738895b5f0a4b1f4de2e10a73bc3eb7609d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6167696c652d63726561746976652d6d696e64732f6c61726176656c2d6465762d6c6f67696e2d6c696e6b2e737667)](LICENSE)

A dev-only Artisan command that generates one-time login links for Laravel.

**Why this exists:** During local development, you often need to quickly log in as different users without resetting passwords or navigating login forms. This package provides a single command to generate a secure, short-lived login link — saving time and reducing friction in your dev workflow.

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

[](#installation)

```
composer require agile-creative-minds/laravel-dev-login-link --dev
```

The package auto-discovers, so no manual service provider registration is needed.

Usage
-----

[](#usage)

```
# Generate a login link for the first user
# (if no users exist, a default admin user admin@example.com is created)
php artisan dev:login-link

# Generate a login link for a specific user
php artisan dev:login-link 5
```

The generated URL is valid for 10 minutes.

Security
--------

[](#security)

This package is designed for **local development only**:

- Routes are only registered when `APP_ENV` is `local`, `development`, or `testing`
- The command refuses to run in production environments
- URLs use Laravel's signed routes with short expiration times
- Requires shell/container access to generate links

**Never enable this in production.**

How It Works
------------

[](#how-it-works)

1. The command generates a temporary signed URL using `URL::temporarySignedRoute('dev.login', ...)`
2. When visited, the `signed` middleware verifies the URL hasn't been tampered with or expired
3. If valid, the user is logged in via `Auth::login()` and redirected to `/dashboard` (or `/` if no dashboard route exists)

Troubleshooting
---------------

[](#troubleshooting)

### "I clicked the link but nothing seems different"

[](#i-clicked-the-link-but-nothing-seems-different)

On a fresh Laravel install without an auth starter kit (Breeze, Jetstream, etc.), there's no `/dashboard` route or visible auth UI. The login **is working**, but you're redirected to `/` which doesn't show login status.

**Solution:** Install Laravel Breeze for a complete auth experience:

```
composer require laravel/breeze --dev
php artisan breeze:install blade
php artisan migrate
```

After this, the login link will redirect you to `/dashboard` where you'll see you're authenticated.

### "I get redirected to the login page"

[](#i-get-redirected-to-the-login-page)

This usually means the session isn't persisting. Make sure your Laravel app has:

- `SESSION_DRIVER` set in `.env` (e.g., `database`, `file`, `cookie`)
- The `sessions` table migrated if using `database` driver
- The `/dev-login/{user}` route uses the `web` middleware group (handled by the package by default)

### "Route \[dev.login\] not defined"

[](#route-devlogin-not-defined)

The route only loads in `local`, `development`, or `testing` environments. Check your `APP_ENV` in `.env`:

```
APP_ENV=local
```

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

[](#requirements)

- PHP 8.2+
- Laravel 11.x or 12.x (any app using the default `web` guard and `users` provider)
- For best experience: Laravel Breeze, Jetstream, or custom auth scaffolding

License
-------

[](#license)

MIT

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance82

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

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

96d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/931d4311eb75c1f031c18783b08c05107d3ada912fe3e53d86589b53e3c167fb?d=identicon)[bonrita](/maintainers/bonrita)

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/agile-creative-minds-laravel-dev-login-link/health.svg)

```
[![Health](https://phpackages.com/badges/agile-creative-minds-laravel-dev-login-link/health.svg)](https://phpackages.com/packages/agile-creative-minds-laravel-dev-login-link)
```

###  Alternatives

[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8425.3M87](/packages/laravel-doctrine-orm)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[casbin/laravel-authz

An authorization library that supports access control models like ACL, RBAC, ABAC in Laravel.

324339.9k4](/packages/casbin-laravel-authz)

PHPackages © 2026

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