PHPackages                             skywalker-labs/laraguard - 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. skywalker-labs/laraguard

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

skywalker-labs/laraguard
========================

On-premises 2FA Authentication for all your users out-of-the-box

v1.0.0(2mo ago)10MITPHPPHP ^8.1|^8.2|^8.3|^8.4

Since Mar 3Pushed 2mo agoCompare

[ Source](https://github.com/skywalker-labs/laraguard)[ Packagist](https://packagist.org/packages/skywalker-labs/laraguard)[ Docs](https://github.com/skywalker-labs/laraguard)[ GitHub Sponsors](https://github.com/sponsors/ermradulsharma)[ RSS](/packages/skywalker-labs-laraguard/feed)WikiDiscussions main Synced 1mo ago

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

[![Laraguard Omega Logo](logo.jpg)](logo.jpg)Laraguard Omega (v1.0) 🛡️💎
==========================

[](#laraguard-omega-v10-️)

### The Ultimate Sovereign 2FA Fortress for Laravel

[](#the-ultimate-sovereign-2fa-fortress-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/73d73b2841ef0785aae4c33d47dd08fb110b1749f4a6bb82e95f05f7c7dbcc82/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736b7977616c6b65722d6c6162732f6c61726167756172642e7376673f7374796c653d666f722d7468652d626164676526636f6c6f723d626c7565)](https://packagist.org/packages/skywalker-labs/laraguard)[![Quality Score](https://camo.githubusercontent.com/44d7d37d5396fbd2eefcb89886b2b478eb35bd8292d2b87231c0bf5a4fd44ff3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f736b7977616c6b65722d6c6162732f6c61726167756172642e7376673f7374796c653d666f722d7468652d6261646765)](https://scrutinizer-ci.com/g/skywalker-labs/laraguard)[![Total Downloads](https://camo.githubusercontent.com/b302fa60722ad0dfbcf5133dcf15f28f47079bfaa41174c202192ca479826724/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736b7977616c6b65722d6c6162732f6c61726167756172642e7376673f7374796c653d666f722d7468652d626164676526636f6c6f723d373737626234)](https://packagist.org/packages/skywalker-labs/laraguard)[![Laravel Support](https://camo.githubusercontent.com/3d8b71002346e6eea6edf43817cbd5d1a37bcf96c04693bae7d326b0a5f04052/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d382e302d2d31322532422d7265642e7376673f7374796c653d666f722d7468652d6261646765)](https://laravel.com)[![PHP Version](https://camo.githubusercontent.com/432e15a2e70f1bdc63c536a6f24e3ed117f941a44ecd732bdea29b50b45eafb8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312b2d3737376262342e7376673f7374796c653d666f722d7468652d6261646765)](https://php.net)

---

**Laraguard Omega** is a premier, enterprise-grade Two-Factor Authentication (2FA) suite for Laravel. Re-engineered from the ground up in v1.0, it offers a "Sovereign Security" experience that combines stealth architecture with elite performance.

🏛️ Modern Architecture (The V5 Refactor)
----------------------------------------

[](#️-modern-architecture-the-v5-refactor)

Laraguard v1.0 introduces a modernized, PSR-4 compliant directory structure built for maximum maintainability:

- 🧬 **`src/Traits`**: Decoupled, reusable security concerns.
- � **`src/Providers`**: High-performance service bootstrapping and discovery.
- 🧱 **`src/Models`**: Dedicated model layer with specialized `Concerns`.
- ✅ **100% Stability**: Verified by 96 rigorous tests and 392 assertions.

🔥 Elite Omega Features
----------------------

[](#-elite-omega-features)

- 🕵️ **Stealth Pivot Masking**: Automatically shields 2FA relationships from JSON/Array serialization.
- 🌍 **Pluggable Geofencing**: Interface-based geolocation (MaxMind, IPStack, or custom).
- ⚡ **Performance Caching**: In-memory status caching for millisecond-speed authentication checks.
- 🔑 **Passkeys Ready**: Foundational support for FIDO2/WebAuthn biometric keys.
- 📋 **Audit Intelligence**: Automated event logging for all critical security transitions.
- 🎨 **Premium UI**: Seamless Filament PHP integration and beautiful Blade components.

🛠️ Installation
---------------

[](#️-installation)

```
composer require skywalker-labs/laraguard
```

### 1. Protect Your Models

[](#1-protect-your-models)

Add the `TwoFactorAuthentication` trait to any authenticatable model:

```
use Skywalker\Laraguard\Traits\TwoFactorAuthentication;

class User extends Authenticatable {
    use TwoFactorAuthentication;
}
```

### 2. Configure Your Shield

[](#2-configure-your-shield)

Publish the configuration to customize your security tiers:

```
php artisan vendor:publish --provider="Skywalker\Laraguard\Providers\LaraguardServiceProvider"
```

⚡ Quick Usage
-------------

[](#-quick-usage)

### Enable 2FA

[](#enable-2fa)

Confirm the TOTP code from a user's authenticator app to activate protection:

```
$user->confirmTwoFactorAuth($code);
```

### Emergency Recovery

[](#emergency-recovery)

Generate high-entropy, encrypted recovery codes for absolute resilience:

```
$user->generateRecoveryCodes();
```

### Trusted Devices

[](#trusted-devices)

Allow users to "Remember this device" securely with IP-bound, expiring tokens:

```
if ($user->isSafeDevice($request)) {
    // High-speed bypass
}
```

🛡️ Enterprise Grade Security
----------------------------

[](#️-enterprise-grade-security)

- **Triple-Layer Encryption**: Shared secrets and recovery codes are never stored in plain text.
- **Event-Driven Resilience**: Hooks into `TwoFactorEnabled`, `TwoFactorFailed`, and more.
- **Zero-Config Discovery**: Fully compatible with Laravel's package auto-discovery.

---

### Credits &amp; Support

[](#credits--support)

Maintained with ❤️ by **[Skywalker-Labs](https://skywalker-labs.com/)**.
Lead Architect: **[Mradul Sharma](https://mradulsharma.vercel.app/)**

Tip

Need custom security integration? Check our [Documentation](https://github.com/skywalker-labs/laraguard/wiki) or contact the labs.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance86

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

68d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/68241409c48fd5184c979320937b363826a5a9aeeb4260e8d1fa753be39458b9?d=identicon)[ermradulsharma](/maintainers/ermradulsharma)

---

Top Contributors

[![ermradulsharma](https://avatars.githubusercontent.com/u/15956546?v=4)](https://github.com/ermradulsharma "ermradulsharma (9 commits)")

---

Tags

laravelAuthentication2fatwo-factorskywalker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/skywalker-labs-laraguard/health.svg)

```
[![Health](https://phpackages.com/badges/skywalker-labs-laraguard/health.svg)](https://phpackages.com/packages/skywalker-labs-laraguard)
```

###  Alternatives

[laragear/two-factor

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

339785.3k8](/packages/laragear-two-factor)[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M347](/packages/tymon-jwt-auth)[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.8M52](/packages/php-open-source-saver-jwt-auth)[aedart/athenaeum

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

255.2k](/packages/aedart-athenaeum)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)

PHPackages © 2026

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