PHPackages                             jacquestrdx123/vue-login-flow - 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. jacquestrdx123/vue-login-flow

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

jacquestrdx123/vue-login-flow
=============================

A Laravel package to quickly set up custom guards with Inertia.js/Vue login pages

1.1.1(4mo ago)01MITPHPPHP ^8.1

Since Jan 6Pushed 4mo agoCompare

[ Source](https://github.com/jacquestrdx123/vue-login-flow)[ Packagist](https://packagist.org/packages/jacquestrdx123/vue-login-flow)[ RSS](/packages/jacquestrdx123-vue-login-flow/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

Vue Login Flow
==============

[](#vue-login-flow)

A Laravel package that quickly sets up custom authentication guards with Inertia.js/Vue login pages.

Features
--------

[](#features)

- Automatically configures Laravel guards and providers
- Generates Vue login components with Inertia.js
- Creates login controllers with authentication logic
- Optional HandleInertiaRequest middleware for guard-specific data sharing
- Supports both session and Sanctum authentication

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

[](#installation)

1. Install the package via Composer:

```
composer require jacquestredoux/vue-login-flow
```

2. During installation, you'll be prompted for:

    - **Model name** (e.g., `User`, `Admin`)
    - **Guard name** (e.g., `admin`, `staff`)
    - **URL prefix** (e.g., `/admin`, `/staff`)
    - **Create login page?** (yes/no)
    - **Create HandleInertiaRequest middleware?** (yes/no)
3. Run the install command to copy files to your Laravel application:

```
php artisan vue-login-flow:install
```

4. Compile your assets:

```
npm run dev
```

Usage
-----

[](#usage)

After installation, you can access the login page at the URL prefix you specified (e.g., `/admin/login`).

### Authentication

[](#authentication)

The package creates a login controller that handles:

- `GET {url_prefix}/login` - Show login form
- `POST {url_prefix}/login` - Handle login
- `POST {url_prefix}/logout` - Handle logout

### Using the Guard

[](#using-the-guard)

In your controllers, use the guard like this:

```
use Illuminate\Support\Facades\Auth;

// Get authenticated user
$user = Auth::guard('admin')->user();

// Check if authenticated
if (Auth::guard('admin')->check()) {
    // User is authenticated
}

// Require authentication in middleware
Route::middleware(['auth:admin'])->group(function () {
    // Protected routes
});
```

### HandleInertiaRequest Middleware

[](#handleinertiarequest-middleware)

If you enabled the HandleInertiaRequest middleware, it will share the authenticated user for your guard in Inertia responses:

```

// In your Vue components
const props = defineProps({
    auth: {
        admin: {
            user: {
                id: Number,
                name: String,
                email: String,
            }
        }
    }
})

```

You can apply this middleware to specific routes:

```
Route::prefix('admin')
    ->middleware(['auth:admin', 'admin.handle-inertia'])
    ->group(function () {
        // Your admin routes
    });
```

Configuration
-------------

[](#configuration)

The package creates a `config/vue-login-flow.php` file with your settings. You can modify it directly or use environment variables:

```
VUE_LOGIN_FLOW_MODEL=App\Models\Admin
VUE_LOGIN_FLOW_GUARD=admin
VUE_LOGIN_FLOW_URL_PREFIX=/admin
VUE_LOGIN_FLOW_CREATE_LOGIN_PAGE=true
VUE_LOGIN_FLOW_CREATE_MIDDLEWARE=false
VUE_LOGIN_FLOW_AUTH_TYPE=session
```

File Structure
--------------

[](#file-structure)

After installation, the following files are created:

```
app/
├── Http/
│   ├── Controllers/
│   │   └── {GuardName}/
│   │       └── LoginController.php
│   └── Middleware/
│       └── {GuardName}HandleInertiaRequest.php (optional)

resources/
└── js/
    └── Pages/
        └── {GuardName}/
            └── Login.vue

routes/
└── web.php (routes added)

```

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

[](#requirements)

- PHP 8.1+
- Laravel 10.0+ or 11.0+
- Inertia.js Laravel adapter
- Vue 3

License
-------

[](#license)

MIT

Support
-------

[](#support)

For issues and questions, please open an issue on GitHub.

vue-login-flow
==============

[](#vue-login-flow-1)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance77

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 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 ~1 days

Total

3

Last Release

125d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/79e50e892789e6edfa4fc8e6e6110a25138bbae47556cd1d94d9fe5ca7962554?d=identicon)[jacquestrdx123](/maintainers/jacquestrdx123)

---

Top Contributors

[![jacquestrdx123](https://avatars.githubusercontent.com/u/40657951?v=4)](https://github.com/jacquestrdx123 "jacquestrdx123 (8 commits)")

### Embed Badge

![Health badge](/badges/jacquestrdx123-vue-login-flow/health.svg)

```
[![Health](https://phpackages.com/badges/jacquestrdx123-vue-login-flow/health.svg)](https://phpackages.com/packages/jacquestrdx123-vue-login-flow)
```

###  Alternatives

[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[josiasmontag/laravel-recaptchav3

Recaptcha V3 for Laravel package

2641.6M2](/packages/josiasmontag-laravel-recaptchav3)[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)[hasinhayder/tyro

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

6712.1k2](/packages/hasinhayder-tyro)

PHPackages © 2026

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