Auth for Laravels
Laravel auth covers authentication, proving who a user is, and authorisation, deciding what they may do. Starter kits, sessions and Sanctum tokens handle login and API access, while gates and policies define permissions for actions such as updating a particular post.
Stage: Authentication and Features · Part of the Laravel roadmap · Last reviewed 19 November 2026
What to learn in Auth
- Set up login, registration and password reset using a starter kit
- Protect routes with the auth middleware and guard selection
- Issue and use API tokens with Laravel Sanctum
- Write a policy that decides whether a user can update a model
- Call authorisation from controllers and Blade with can and authorize
Auth interview questions
What is the difference between a gate and a policy?
A gate is a closure that authorises a single action, suited to simple checks. A policy is a class that groups authorisation logic for one model, with methods like view, update and delete. Policies are usually clearer once an app has several resources.
When would you use Sanctum?
Use Sanctum for first party single page apps with cookie based sessions, or for simple personal access tokens for mobile apps and APIs. It is lightweight and fits most needs, while a full OAuth server such as Passport is for third party delegated access.
Where Auth fits in the Laravel roadmap
Auth belongs to the Authentication and Features stage (intermediate level), which takes about 20 hours. Real apps.
Other units in this stage
Back to the full Laravel roadmap