laravel/sanctum
Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs. observed · 2026-08-28
Health v2 · maintenance only
96/100
- Activity 96
- Release rhythm 94
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 14
- age_days: 2429
- days_rel: 43
- days_push: 29
- n_releases_24m: 18
Adoption not part of the score
2977 stars · 329 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Laravel Sanctum is a featherweight authentication package for Laravel that issues API tokens and authenticates single-page applications, mobile apps, and simple token-based APIs. It stores tokens in a single database table with optional abilities/scopes, avoiding the complexity of OAuth.
Use cases
- issue personal access tokens for a Laravel API
- authenticate a Vue or React SPA against a Laravel backend
- add token-based auth to a mobile app without OAuth
- grant scoped abilities to API tokens
- authenticate users with session cookies for same-domain SPAs
- revoke or expire API tokens per user
When to choose
- you have a Laravel backend serving an SPA, mobile app, or simple API
- you want lightweight token auth without OAuth complexity
- you need per-token abilities/scopes and easy revocation
When to avoid
- you need full OAuth2 flows (use Laravel Passport instead)
- your project is not built on Laravel/PHP
- you need federated identity like SAML or OIDC
Facets
library · maturity stable
auth middleware api-framework web-development backend security apis php api-tokens spa-authentication personal-access-tokens token-scopes mobile-authentication laravel-ecosystem laravel web-server
10 sources
- readme: https://github.com/laravel/sanctum · fetched 2026-08-28 · 2febd3366ab2
- homepage: https://laravel.com/docs/sanctum · fetched 2026-08-29 · 4933d2bbdec4
- site_page: https://laravel.com/framework/docs/releases · fetched 2026-08-29 · 5c016fc7c447
- site_page: https://laravel.com/framework/docs/upgrade · fetched 2026-08-29 · ab7e04529370
- site_page: https://laravel.com/framework/docs/contributions · fetched 2026-08-29 · 055cecf89580
- site_page: https://laravel.com/framework/docs/installation · fetched 2026-08-29 · 07f03770b063
- site_page: https://laravel.com/framework/docs/configuration · fetched 2026-08-29 · c92529598f75
- site_page: https://laravel.com/framework/docs/ai · fetched 2026-08-29 · e6f260f0ed87
- site_page: https://laravel.com/framework/docs/structure · fetched 2026-08-29 · ee79808881f8
- site_page: https://laravel.com/framework/docs/frontend · fetched 2026-08-29 · 2bbbf553c4eb
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| laravel/sanctum | main | 96 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem