Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Fortify Laravel Package

laravel/fortify

Laravel Fortify is a frontend-agnostic authentication backend for Laravel. It provides the core endpoints and logic for registration, login, password reset, email verification, and two-factor authentication used by Laravel starter kits.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Buy – Fortify eliminates the need to build authentication from scratch, reducing development time and maintenance overhead. Ideal for teams prioritizing speed and security without reinventing the wheel.
  • Core Features:
    • Multi-Factor Authentication (MFA): Supports 2FA via TOTP (e.g., Google Authenticator) with recovery codes, reducing account compromise risks.
    • Passwordless & Social Logins: Integrates with Laravel Sanctum for SPA/API auth and supports OAuth (via third-party packages like Laravel Socialite).
    • Customizable Workflows: Extendable for features like "Remember Me," email verification, and password resets without rewriting logic.
    • Frontend Agnostic: Works with any frontend (React, Vue, Svelte, or traditional Blade) via API endpoints, enabling decoupled architectures.
  • Roadmap Alignment:
    • Security-First: Regular updates (e.g., PHP 8.5/Laravel 13 compatibility, 2FA event improvements) align with modern security standards.
    • Scalability: Supports Laravel Octane (high-performance HTTP server) and case-insensitive password resets for global audiences.
    • Compliance: Built-in rate limiting and event dispatching (e.g., TwoFactorAuthenticationFailed) aid audit trails for GDPR/SOC2.
  • Use Cases:
    • SaaS Platforms: Rapidly deploy secure auth for multi-tenant applications.
    • Marketplaces: Leverage skills-based authentication (e.g., vendor verification) via Fortify’s new Skills feature.
    • Legacy Modernization: Migrate monolithic apps to microservices by replacing auth with a standardized API layer.

When to Consider This Package

Adopt Fortify If:

  • You’re using Laravel and need a batteries-included auth solution (no need for Laravel Breeze/Jetstream if you want API-only or custom UIs).
  • Security is critical: Fortify handles password hashing (via Laravel’s Hash facade), 2FA, and rate limiting out-of-the-box.
  • Your team lacks auth expertise: Reduces risk of misconfigurations (e.g., SQL injection in custom login logic).
  • You need frontend flexibility: Works with SPAs, mobile apps (via Sanctum), or traditional server-rendered views.
  • You require extensibility: Customize validation, middleware, or events (e.g., trigger Slack alerts on failed 2FA attempts).
  • You’re on Laravel 9+: Fortify drops support for older versions, ensuring modern PHP/Laravel compatibility.

Look Elsewhere If:

  • You need a full UI kit: Fortify is backend-only; pair it with Laravel Jetstream or Livewire for Blade templates.
  • You’re not using Laravel: Fortify is Laravel-specific (e.g., no Symfony/Symfony support).
  • You require advanced SSO: Fortify lacks built-in SAML/OIDC; use Laravel Socialite or League OAuth2 instead.
  • You need legacy PHP support: Minimum PHP 8.1 (as of v1.36.x); older projects may require custom forks.
  • You want open-source contributions: Fortify is maintained by Laravel core team but lacks community-driven features (e.g., no active PRs for novel auth methods like WebAuthn).

How to Pitch It (Stakeholders)

For Executives:

*"Fortify is a turnkey authentication system for Laravel that cuts development time by 80% while adding enterprise-grade security. It handles:

  • Passwordless logins (via email/magic links) to reduce support tickets.
  • Two-factor authentication with recovery codes to meet compliance (SOC2/GDPR).
  • Seamless API integration for our mobile/web apps, avoiding vendor lock-in. By adopting Fortify, we eliminate tech debt from custom auth systems and future-proof our stack with Laravel’s long-term support. The MIT license and active maintenance (last update: March 2026) ensure we’re not betting on a dead project."*

ROI:

  • Dev Time: 2–4 weeks saved vs. building auth from scratch.
  • Security: Built-in protections against brute force, credential stuffing, and session hijacking.
  • Scalability: Supports 10K+ users out-of-the-box with Laravel’s caching and queue systems.

For Engineering Teams:

*"Fortify provides a modular, event-driven auth backend that integrates cleanly with our existing Laravel services. Key advantages:

  • API-First Design: Frontend teams can use any framework (React/Vue) via REST/GraphQL endpoints.
  • Extensible: Override controllers, validation rules, or middleware without forking. Example:
    // Customize password reset logic
    Fortify::authenticateUsing(function ($request) {
        return CustomUser::where('email', $request->email)->first();
    });
    
  • Modern Features:
    • 2FA Events: Hook into TwoFactorAuthenticationFailed to trigger alerts.
    • Skills System: Verify user roles (e.g., ‘Premium’) via Fortify::canUpdatePasswords().
    • Octane Support: Zero-downtime deployments with Laravel’s high-performance server.
  • Compatibility: Works with Sanctum (SPAs), Session (traditional apps), and even third-party auth like Auth0 (via middleware).

Migration Path:

  1. Install via Composer: composer require laravel/fortify.
  2. Publish configs: php artisan vendor:publish --provider="Laravel\Fortify\FortifyServiceProvider".
  3. Replace custom auth routes/controllers with Fortify’s scaffolding.
  4. Extend via service providers or traits (e.g., InteractsWithTwoFactorState).

Trade-offs:

  • No UI Components: Pair with Livewire or Alpine.js for Blade templates.
  • Laravel Dependency: Not suitable for non-Laravel stacks (e.g., Symfony)."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport