fortify-development

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

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/coleYab/usacr --skill fortify-development-coleyab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fortify-development
Source: https://github.com/coleYab/usacr/tree/main/.grok/skills/fortify-development
Command: npx skills add https://github.com/coleYab/usacr --skill fortify-development-coleyab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up authentication in Laravel involves many moving parts—routes, actions, config, view callbacks, and feature flags. This Skill guides you through implementing and customizing Laravel Fortify's headless authentication backend, from basic login to advanced features like two-factor authentication and passkeys. ## Core Features & Use Cases - Feature Setup Workflows: Step-by-step checklists for enabling registration, password reset, email verification, 2FA with QR codes and 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 & Headless Auth: Configure Fortify with Sanctum for session-based SPA authentication, including JSON-based 2FA challenge flows. - Use Case: You need to add two-factor authentication to your Laravel app. The Skill walks you through adding the TwoFactorAuthenticatable trait, enabling the feature in config/fortify.php, publishing migrations, and testing QR codes. ## Quick Start Ask the AI to help you set up two-factor authentication with Laravel Fortify in your application.

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 set up view callbacks in FortifyServiceProvider and build a UI for QR codes and recovery codes.

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 during registration, so no route or 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 using the 'web' guard for session-based SPA authentication. Fortify then returns JSON responses, such as {"two_factor": true} when a 2FA challenge is required.

What is the difference between Laravel Fortify, Passport, and Socialite?

Fortify provides headless authentication backend routes and controllers for login, registration, 2FA, and passkeys. Passport handles OAuth2 API tokens, and Socialite handles OAuth social login. This Skill does not cover Passport or Socialite use cases.

How do I customize login redirects in Fortify?

Override the LoginResponse contract in a service provider such as AppServiceProvider to control post-login redirects. You can also use Fortify::authenticateUsing() or Fortify::authenticateThrough() to customize the authentication pipeline itself.