skywalker-labs/laraguard

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

Maintainers

Package info

github.com/skywalker-labs/laraguard

pkg:composer/skywalker-labs/laraguard

Fund package maintenance!

ermradulsharma

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-03-03 04:10 UTC

This package is auto-updated.

Last update: 2026-03-03 04:24:58 UTC


README

Laraguard Omega Logo

Laraguard Omega (v1.0) 🛡️💎

The Ultimate Sovereign 2FA Fortress for Laravel

Latest Version on Packagist Quality Score Total Downloads Laravel Support PHP Version

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)

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

  • 🕵️ 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

composer require skywalker-labs/laraguard

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

Publish the configuration to customize your security tiers:

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

⚡ Quick Usage

Enable 2FA

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

$user->confirmTwoFactorAuth($code);

Emergency Recovery

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

$user->generateRecoveryCodes();

Trusted Devices

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

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

🛡️ 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 & Support

Maintained with ❤️ by Skywalker-Labs.
Lead Architect: Mradul Sharma

Tip

Need custom security integration? Check our Documentation or contact the labs.