---
title: "Laravel Fortify Tutorial for Inertia Apps"
description: "A Laravel Fortify tutorial for Inertia apps: install Fortify, pick features, render Inertia pages and wire up login, registration and password reset."
pageClass: blog-page
date: 2026-09-29
author: erag
category: security
tags: [Authentication, Inertia]
---
# Laravel Fortify Tutorial: Headless Authentication for Inertia Apps
Laravel Fortify gives you every authentication route and controller you need, and not a single screen. In an Inertia app that's exactly what you want, because the pages live in Vue, React or Svelte anyway. In this Laravel Fortify tutorial we install Fortify, choose its features, render an Inertia page for each view, and walk through how login, registration and password reset actually work, including where you can customise them.
## What Fortify does and what you build
Fortify is a headless authentication backend. It registers routes, runs validation and hashing, talks to the session guard, and returns redirects or JSON. Your side of the deal is the pages plus a few small action classes.
| Fortify handles | You provide |
| --- | --- |
| Routes and controllers for login, logout, registration, password reset, email verification, password confirmation, 2FA and passkeys | The Inertia pages (forms, links, status messages) |
| The login pipeline, throttling hooks and session regeneration | Rate limiter definitions |
| Password reset tokens and emails via Laravel's password broker | The `CreateNewUser` and `ResetUserPassword` actions |
| Events such as `Registered` and `PasswordReset` | Listeners, if you need them |
Since the frontend is entirely yours, one Fortify setup works the same for an Inertia app built on Vue, React or Svelte.
## Laravel Fortify tutorial: installing the package
Require the package, run the installer and migrate:
```bash
composer require laravel/fortify
php artisan fortify:install
php artisan migrate
```
`fortify:install` publishes all the files you'll end up editing. There's `config/fortify.php`, which holds the guard, password broker, features, limiters and redirects. There's `app/Providers/FortifyServiceProvider.php`, already registered in `bootstrap/providers.php` for you. Under `app/Actions/Fortify/` you get `CreateNewUser`, `ResetUserPassword`, `UpdateUserPassword`, `UpdateUserProfileInformation` and a `PasswordValidationRules` trait. And finally there are migrations for the two-factor columns on `users` and for the `passkeys` table.
## Choosing features in config/fortify.php
Each entry in the `features` array turns on a group of routes. If you leave one out, its routes are never registered at all.
```php
use Laravel\Fortify\Features;
'features' => [
Features::registration(),
Features::resetPasswords(),
Features::emailVerification(),
Features::twoFactorAuthentication(['confirm' => true, 'confirmPassword' => true]),
Features::passkeys(['confirmPassword' => true]),
],
```
| Feature | What it adds | Deep dive |
| --- | --- | --- |
| `registration()` | `/register` page and POST | This post |
| `resetPasswords()` | Forgot and reset password pages and POSTs | This post |
| `emailVerification()` | Verification notice, signed link and resend | [Email verification in Laravel](/blog/laravel-email-verification.html) |
| `updateProfileInformation()` / `updatePasswords()` | PUT endpoints for profile and password changes | Optional; many apps write their own settings controllers |
| `twoFactorAuthentication()` | TOTP setup, QR code, recovery codes and the login challenge | [Two-factor authentication in Laravel](/blog/laravel-two-factor-authentication.html) |
| `passkeys()` | WebAuthn registration and passwordless login | [Passkeys in Laravel](/blog/laravel-passkeys.html) |
Login, logout and password confirmation are always registered, whatever you put here.
While you have the file open, look at a few other settings. `guard` and `passwords` pick the session guard and password broker Fortify uses. `username` and `email` are the field names on the login and reset forms, and `lowercase_usernames` lowercases the email before login and registration. `home` is the default redirect after login, registration and reset. If you want every Fortify route under a path or a subdomain, that's what `prefix` and `domain` are for.
## Rendering Inertia pages for Fortify
Fortify's GET routes (`/login`, `/register`, `/forgot-password` and so on) need you to tell them what to render. You do that in `FortifyServiceProvider::boot()` by returning an Inertia response:
```php
use Inertia\Inertia;
use Laravel\Fortify\Features;
use Laravel\Fortify\Fortify;
Fortify::loginView(fn (Request $request) => Inertia::render('auth/Login', [
'canResetPassword' => Features::enabled(Features::resetPasswords()),
'canRegister' => Features::enabled(Features::registration()),
'status' => $request->session()->get('status'),
]));
Fortify::registerView(fn () => Inertia::render('auth/Register'));
Fortify::requestPasswordResetLinkView(fn () => Inertia::render('auth/ForgotPassword'));
```
`resetPasswordView`, `verifyEmailView`, `confirmPasswordView` and `twoFactorChallengeView` follow the same pattern. On the reset page, pass `$request->route('token')` and `$request->email` as props so the form can post them back.
We'd always pass flags like `canRegister`, so the page can hide links to features you've switched off. Pass the session `status` as well. That's where Fortify flashes messages like "We have emailed your password reset link".
## How the Fortify login flow works
The login page posts `email`, `password` and an optional `remember` to `POST /login` (route name `login.store`). Using Inertia's `