auth-and-authorization - Implement Laravel authentication and authorization
Implement Laravel authentication with Sanctum and authorization with policies, gates, middleware, and role-based access control.
Tags
Updated: 2026-10-07Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Configure Sanctum SPA authentication
- Implement API token authentication
- Create login and logout flows
- Define policies and gates
- Protect routes with middleware
- Apply role-based access control
- Add login rate limiting
Inputs
- Laravel application
- Sanctum configuration
- Authentication routes
- User credentials
- API requests
- Authorization rules
Outputs
- Authentication redirects
- Issued API tokens
- Revoked API tokens
- Protected API responses
- Authorization decisions
- Validation and lockout messages
Requirements
- Laravel application
- Laravel Sanctum
- Inertia.js
- React
- Session authentication support
- API middleware support
