PHPackages                             laravilt/auth - 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. laravilt/auth

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

laravilt/auth
=============

Complete authentication system for Laravilt with 8 methods: login, registration, OTP, 2FA, password reset, social auth, passkeys, and magic links

1.0.4(2mo ago)0464↓45.5%1[1 issues](https://github.com/laravilt/auth/issues)2MITHTMLPHP ^8.3|^8.4CI passing

Since Dec 11Pushed 2mo agoCompare

[ Source](https://github.com/laravilt/auth)[ Packagist](https://packagist.org/packages/laravilt/auth)[ GitHub Sponsors](https://github.com/fadymondy)[ RSS](/packages/laravilt-auth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (22)Versions (6)Used By (2)

[![Auth](./arts/screenshot.jpg)](./arts/screenshot.jpg)

Laravilt Auth
=============

[](#laravilt-auth)

[![Latest Stable Version](https://camo.githubusercontent.com/7a96873e74dfabaa392bcb3a4b8b22c589d28992693801e4eb1fe2bb3d8bff64/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176696c742f617574682f76657273696f6e2e737667)](https://packagist.org/packages/laravilt/auth)[![License](https://camo.githubusercontent.com/d5b7a4871d26444d6c36e2ccd002fd616fbbe7638abed434898d8af4dccbc7b0/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176696c742f617574682f6c6963656e73652e737667)](https://packagist.org/packages/laravilt/auth)[![Downloads](https://camo.githubusercontent.com/ce72082dd0da132f0e45bb56fa087b74a63bf8bcdb80c2fb29a09723c0b5565c/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176696c742f617574682f642f746f74616c2e737667)](https://packagist.org/packages/laravilt/auth)[![Dependabot Updates](https://github.com/laravilt/auth/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/laravilt/auth/actions/workflows/dependabot/dependabot-updates)[![PHP Code Styling](https://github.com/laravilt/auth/actions/workflows/fix-php-code-styling.yml/badge.svg)](https://github.com/laravilt/auth/actions/workflows/fix-php-code-styling.yml)[![Tests](https://github.com/laravilt/auth/actions/workflows/tests.yml/badge.svg)](https://github.com/laravilt/auth/actions/workflows/tests.yml)

Complete authentication system for Laravilt with 8 authentication methods, 20+ events, custom pages, and multi-panel support.

Features
--------

[](#features)

### 🔐 8 Authentication Methods

[](#-8-authentication-methods)

1. **Standard Login &amp; Registration** - Email/password authentication with remember me
2. **OTP Email Verification** - One-time passwords sent via email
3. **Two-Factor Authentication** - TOTP (Google Authenticator) and email codes
4. **Password Reset** - Secure password reset flow with email links
5. **Social Authentication** - OAuth login (GitHub, Google, Facebook, Twitter, etc.)
6. **Passkey Authentication** - WebAuthn passwordless biometric login
7. **Magic Links** - Passwordless one-click email authentication
8. **Connected Accounts** - Link multiple auth providers to one account

### 📡 20+ Events

[](#-20-events)

- `LoginAttempt`, `LoginSuccessful`, `LoginFailed`
- `RegistrationAttempt`, `RegistrationCompleted`
- `OtpSent`, `OtpVerified`, `OtpFailed`
- `TwoFactorEnabled`, `TwoFactorDisabled`, `TwoFactorChallengeFailed`, `TwoFactorChallengeSuccessful`
- `PasswordResetRequested`, `PasswordReset`
- `SocialAuthenticationAttempt`, `SocialAuthenticationFailed`, `SocialAuthenticationSuccessful`
- `PasskeyRegistered`, `PasskeyAuthenticated`
- `MagicLinkSent`

### 🎨 Custom Pages &amp; Multi-Panel Support

[](#-custom-pages--multi-panel-support)

Replace any page and configure different authentication methods per panel.

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

[](#installation)

### Composer

[](#composer)

```
composer require laravilt/auth
```

### NPM

[](#npm)

```
npm install @laravilt/auth
```

Quick Start
-----------

[](#quick-start)

### Basic Panel Setup

[](#basic-panel-setup)

```
use Laravilt\Panel\Panel;

Panel::make('admin')
    ->login()                              // Enable login
    ->registration()                       // Enable registration
    ->passwordReset()                      // Enable password reset
    ->emailVerification()->otp()           // Enable OTP verification
    ->twoFactor()                          // Enable 2FA
    ->socialAuth(['github', 'google'])     // Enable social auth
    ->passkeys()                           // Enable passkeys
    ->magicLinks();                        // Enable magic links
```

### Custom Pages

[](#custom-pages)

```
use App\Auth\CustomLogin;

Panel::make('admin')
    ->login(CustomLogin::class);  // Use custom login page
```

### Event Listeners

[](#event-listeners)

```
use Laravilt\Auth\Events\LoginSuccessful;

Event::listen(LoginSuccessful::class, function ($event) {
    Log::info('User logged in: ' . $event->user->email);
});
```

Vue/TypeScript Usage
--------------------

[](#vuetypescript-usage)

```
import { LoginPage, RegisterPage } from '@laravilt/auth'
import { useAuth } from '@laravilt/auth'

const { user, logout } = useAuth()
```

Publishing
----------

[](#publishing)

### Build for NPM

[](#build-for-npm)

```
npm run build:npm
```

### Publish to NPM

[](#publish-to-npm)

```
npm publish --access public
```

### Publish to Packagist

[](#publish-to-packagist)

```
git tag v1.0.0
git push origin master --tags
```

MCP Server
----------

[](#mcp-server)

AI-assisted development with MCP tools:

- `search-docs` - Search auth documentation
- `get-event-info` - Get event details
- `list-auth-methods` - List authentication methods

Documentation
-------------

[](#documentation)

- **Complete Docs**: `docs/index.md`
- **Test Summary**: `TEST_SUMMARY.md`
- **Website**:

Testing
-------

[](#testing)

```
composer test
```

**Coverage**: 26 tests | 70 assertions | All events tested

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

[](#requirements)

- PHP 8.3+
- Laravel 12+
- Vue 3.3+
- Inertia.js 2.0+

License
-------

[](#license)

MIT License - see [LICENSE.md](LICENSE.md)

Credits
-------

[](#credits)

**Author**: Fady Mondy () **Website**:

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance83

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.7% 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 ~18 days

Total

5

Last Release

84d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2147eb2fca7ab5f0124d0fafd88ba2d2a5dfa3a0036fb8872d1084b7cba29366?d=identicon)[fadymondy](/maintainers/fadymondy)

---

Top Contributors

[![fadymondy](https://avatars.githubusercontent.com/u/11937812?v=4)](https://github.com/fadymondy "fadymondy (33 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![actions-user](https://avatars.githubusercontent.com/u/65916846?v=4)](https://github.com/actions-user "actions-user (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")[![swarakaka](https://avatars.githubusercontent.com/u/9349190?v=4)](https://github.com/swarakaka "swarakaka (1 commits)")

---

Tags

laravelotpauthAuthentication2faloginregistrationpasskeyslaraviltpassword-resetsocial-authmagic-links

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/laravilt-auth/health.svg)

```
[![Health](https://phpackages.com/badges/laravilt-auth/health.svg)](https://phpackages.com/packages/laravilt-auth)
```

###  Alternatives

[auth0/login

Auth0 Laravel SDK. Straight-forward and tested methods for implementing authentication, and accessing Auth0's Management API endpoints.

2745.0M3](/packages/auth0-login)[awes-io/auth

Laravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).

3826.7k1](/packages/awes-io-auth)[teresko/palladium

User authentication and registration component

4414.2k](/packages/teresko-palladium)[lakm/nopass

Provides passwordless authentication for your laravel projects.

2213.6k2](/packages/lakm-nopass)[remotemerge/totp-php

Lightweight, fast, and secure TOTP (2FA) authentication library for PHP — battle tested, dependency free, and ready for enterprise integration.

2010.2k](/packages/remotemerge-totp-php)

PHPackages © 2026

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