Laravel Sanctum provides a simple way to authenticate SPAs, mobile apps, and simple token-based APIs. It issues personal access tokens for APIs or uses cookie-based session authentication for first-party SPAs, avoiding full OAuth complexity. Tokens can be scoped with abilities to restrict what actions they permit.
← Laravel theorytheory 0/50 · 0%
Auth · medium
27. Sanctum for API Tokens
Lightweight SPA/API authentication.
Check your understanding
1. What is Sanctum primarily designed for?
2. What can restrict what a Sanctum token is allowed to do?