fortify-development

Implements Laravel Fortify authentication including login, registration, 2FA, and passkeys.

Updated May 26, 2026
One-click install
npx skills add https://github.com/rmethodm/resumegen --skill fortify-development-rmethodm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: fortify-development
Source: https://github.com/rmethodm/resumegen/tree/main/.agents/skills/fortify-development
Command: npx skills add https://github.com/rmethodm/resumegen --skill fortify-development-rmethodm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up authentication in Laravel involves many moving parts: routes, controllers, actions, config, migrations, and views. This Skill guides you through implementing and customizing Laravel Fortify's headless authentication backend without missing critical setup steps. ## Core Features & Use Cases - Feature Setup Workflows: Step-by-step checklists for registration, password reset, email verification, two-factor authentication (TOTP/QR codes/recovery codes), and WebAuthn passkeys. - Customization Guidance: Override authentication logic with Fortify::authenticateUsing(), customize CreateNewUser actions, and override response contracts like LoginResponse for custom redirects. - SPA Authentication: Configure Fortify with Sanctum for session-based SPA login, including JSON two-factor challenge responses. - Use Case: You need to add 2FA to an existing Laravel app. The Skill walks you through adding the TwoFactorAuthenticatable trait, enabling the feature in config/fortify.php, publishing migrations, and testing QR codes and recovery codes. ## Quick Start Help me add two-factor authentication with QR codes and recovery codes to my Laravel app using Fortify.

Frequently Asked Questions about fortify-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up two-factor authentication in Laravel Fortify?▼

Add the TwoFactorAuthenticatable trait to your User model, enable the twoFactorAuthentication feature in config/fortify.php, and publish Fortify migrations if the two-factor columns are missing. Then build a UI for QR code display and recovery code management.

How to customize user registration logic in Laravel Fortify?▼

Edit app/Actions/Fortify/CreateNewUser.php to change validation rules, add fields, or modify user creation logic. Fortify calls this action when handling POST /register requests, so no controller changes are needed.

Does Laravel Fortify work with SPA or headless frontends?▼

Yes. Set 'views' => false in config/fortify.php and pair Fortify with Laravel Sanctum for session-based SPA authentication. Fortify then returns JSON responses, such as {"two_factor": true} when a 2FA challenge is required.

How do I customize the login redirect in Fortify?▼

Override the LoginResponse contract in a service provider to control post-login redirects. You can also use Fortify::authenticateUsing() for custom user retrieval or Fortify::authenticateThrough() to modify the authentication pipeline.

When should I use Fortify instead of Passport or Socialite?▼

Use Fortify for first-party session authentication: login, registration, password reset, 2FA, and passkeys. Use Passport for OAuth2 API token issuance and Socialite for third-party social login; Fortify does not cover those cases.