Laravel Sanctum provides a featherweight authentication system for SPAs (single-page applications), mobile applications, and simple, token-based APIs. Sanctum allows each user of your application to generate multiple API tokens for their account. These tokens may be granted abilities/scopes that specify which actions the tokens are allowed to perform. Laravel Sanctum exists to solve two separate problems. Let's discuss each before digging deeper into the library. First, Sanctum is a simple package you may use to issue API tokens to your users without the complication of OAuth. This feature is inspired by GitHub and other applications that issue "personal access tokens". For example, imagine the "account settings" of your application has a screen where a user may generate an API token for their account. You may use Sanctum to generate and manage those tokens. These tokens typically have a very long expiration time (years), but may be manually revoked by the user anytime.

Features

  • SPA Authentication
  • Sanctum does not use tokens of any kind
  • Sanctum uses Laravel's built-in cookie based session authentication services
  • Sanctum will only attempt to authenticate using cookies when the incoming request originates from your own SPA frontend
  • Override Default Models
  • Documentation available
  • Examples available

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

MIT License

Follow Laravel Sanctum

Laravel Sanctum Web Site

Other Useful Business Software
Orchestrate Your AI Agents with Zenflow Icon
Orchestrate Your AI Agents with Zenflow

The multi-agent workflow engine for modern teams. Zenflow executes coding, testing, and verification with deep repo awareness

Zenflow orchestrates AI agents like a real engineering system. With parallel execution, spec-driven workflows, and deep multi-repo understanding, agents plan, implement, test, and verify end-to-end. Upgrade to AI workflows that work the way your team does.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Laravel Sanctum!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Frameworks

Registered

2024-04-05