Documentation Index
Fetch the complete documentation index at: https://kawax.biz/llms.txt
Use this file to discover all available pages before exploring further.
What is Fortify?
Laravel Fortify is a frontend-agnostic authentication backend implementation. It provides all the routes and controllers required for login, registration, password reset, email verification, two-factor authentication, and passkeys.Fortify has no UI of its own. It works by receiving requests from a starter kit or your own frontend and routing them to the appropriate authentication logic.
History: from Jetstream to the current starter kits
Why the current starter kits still use Fortify
The original React/Vue starter kits were implemented without Fortify. However, when two-factor authentication (2FA) support was needed, Fortify was adopted directly, which caused the entire authentication layer to switch to a Fortify-based implementation. Because Fortify is designed to be frontend-agnostic, it integrates naturally with Inertia-based starter kits and continues to be used today.Fortify is currently the longest-serving official Laravel authentication package. Since its debut in 2020, it has remained active through Jetstream and the current starter kits.
Current starter kit setup
In the React/Vue starter kits, Fortify is configured through these two files:app/Providers/FortifyServiceProvider.php— registers views, actions, and rate limitersconfig/fortify.php— specifies enabled features and authentication settings
Key settings in config/fortify.php
Features::passkeys()) are not enabled by default in the starter kits. Add the feature to the features array to enable them.
FortifyServiceProvider configuration
The starter kit’s FortifyServiceProvider handles three responsibilities.
1. Configuring actions
app/Actions/Fortify/ let you customize user creation and password reset logic. Validation and hashing are centralized here.
2. Configuring views
Features::enabled() checks feature flags before passing them to the view.
In a Blade application, return
view('auth.login') instead of Inertia::render(...). Changing the frontend only requires updating FortifyServiceProvider; the authentication logic remains unchanged.3. Configuring rate limiting
loginlimiter: rate-limits by email address and IP address combination (brute-force protection)two-factorlimiter: rate-limits by the login attempt ID stored in the session
RateLimiter::for() key that matches each key in the limiters array of config/fortify.php.
Features and registered routes
The table below lists the main routes Fortify registers, grouped by feature.| Feature | Method | Route |
|---|---|---|
| Login | GET | /login |
| Login | POST | /login |
| Logout | POST | /logout |
| Registration | GET | /register |
| Registration | POST | /register |
| Password reset request | GET / POST | /forgot-password |
| Password reset | GET / POST | /reset-password |
| Email verification | GET | /email/verify |
| Resend verification email | POST | /email/verification-notification |
| Password confirmation | GET / POST | /user/confirm-password |
| Enable 2FA | POST | /user/two-factor-authentication |
| 2FA challenge | GET / POST | /two-factor-challenge |
| Passkey login | GET / POST | /passkeys/login |
| Passkey management | GET / POST / DELETE | /user/passkeys |
php artisan route:list --name=fortify or simply php artisan route:list to inspect all registered routes.
Two-factor authentication (2FA)
The starter kits enableFeatures::twoFactorAuthentication() with both confirm and confirmPassword set to true.
| Option | Meaning |
|---|---|
confirm | Require the user to confirm with an authentication code after enabling 2FA |
confirmPassword | Require a password confirmation before changing 2FA settings |
Enable 2FA
Send a POST request to
/user/two-factor-authentication. On success, the session receives a two-factor-authentication-enabled status.Scan the QR code
Send a GET request to
/user/two-factor-qr-code to receive the SVG QR code to scan with an authenticator app.Confirm with an authentication code
POST the confirmation code to
/user/confirmed-two-factor-authentication to complete setup.Passkeys
Passkeys are a recent addition to Fortify. They provide passwordless authentication via WebAuthn, supporting Face ID, Touch ID, Windows Hello, and hardware security keys.Enabling passkeys
Add the feature to thefeatures array in config/fortify.php:
PasskeyUser contract and PasskeyAuthenticatable trait to your User model:
passkeys key in config/fortify.php:
Fortify’s passkey support wraps the
laravel/passkeys Composer package internally. You do not need to publish the laravel/passkeys config file — the passkeys key in config/fortify.php takes precedence.@laravel/passkeys JS client, React/Vue/Svelte helpers, and more), see the passkeys introduction guide.
Related pages
Custom authentication guards
Learn how to implement custom authentication guards using the Guard and StatefulGuard interfaces.
Official docs: Laravel Fortify
Full installation instructions, all features, and customization details are in the official documentation.