PHPackages                             xaamin/sanctum - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. xaamin/sanctum

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

xaamin/sanctum
==============

Laravel/Lumen Sanctum provides a featherweight authentication system for SPAs and simple APIs.

v1.0.3(1y ago)12.7kMITPHPPHP ^8.0.2CI passing

Since May 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/xaamin/sanctum)[ Packagist](https://packagist.org/packages/xaamin/sanctum)[ RSS](/packages/xaamin-sanctum/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (9)Versions (7)Used By (0)

[![Logo Laravel Sanctum](/art/logo.svg)](/art/logo.svg)

 [![Build Status](https://github.com/xaamin/sanctum/workflows/tests/badge.svg)](https://github.com/xaamin/sanctum/actions) [![Total Downloads](https://camo.githubusercontent.com/71a35bb79ec2ad0d0352ada1edfe8415a6ad83c2ed5f36587820c32a9c1b5adc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7861616d696e2f73616e6374756d)](https://packagist.org/packages/xaamin/sanctum) [![Latest Stable Version](https://camo.githubusercontent.com/f4efcb0fbe89afdabc1d1d0b647fe1e1da1ead57f6b6df7cde750c46860a4ce6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7861616d696e2f73616e6374756d)](https://packagist.org/packages/xaamin/sanctum) [![License](https://camo.githubusercontent.com/5b0fbd98fdcac258525ae32104f43da40498dec17b9b73b165b0697dd1d83064/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7861616d696e2f73616e6374756d)](https://packagist.org/packages/xaamin/sanctum)

Introduction
------------

[](#introduction)

Lumen Sanctum provides a featherweight authentication system for SPAs and simple APIs.

Installation
------------

[](#installation)

This package requires requires php &gt;= 8.0 and lumen &gt;= 9

Step 1 - Install the package on your project

```
composer require xaamin/sanctum

```

Step 2 - Add the service provider in bootstrap/app.php

```
$app->register(
    Laravel\Sanctum\SanctumServiceProvider::class
);

```

Step 3 - Use `sanctum` as your driver for `api` guard in your `config/auth.php` file, copy the auth config file sample from [here](https://raw.githubusercontent.com/xaamin/sanctum/main/config/sanctum.php).

```
'guards' => [
    'api' => [
        'driver' => 'sanctum',
        'provider' => 'users',
        'hash' => false,
    ],
],

```

Official Documentation
----------------------

[](#official-documentation)

Documentation for Sanctum can be found on the [Laravel website](https://laravel.com/docs/sanctum).

Contributing
------------

[](#contributing)

Thank you for considering contributing to Sanctum! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).

Code of Conduct
---------------

[](#code-of-conduct)

In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](https://github.com/xaamin/sanctum/security/policy) on how to report security vulnerabilities.

License
-------

[](#license)

Lumen Sanctum is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance42

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~169 days

Total

5

Last Release

463d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ab0364ad60f3e9bba208eb33c139b10281bbead4d267ce0fbd8ed50338174e30?d=identicon)[xaamin](/maintainers/xaamin)

---

Top Contributors

[![driesvints](https://avatars.githubusercontent.com/u/594614?v=4)](https://github.com/driesvints "driesvints (139 commits)")[![taylorotwell](https://avatars.githubusercontent.com/u/463230?v=4)](https://github.com/taylorotwell "taylorotwell (105 commits)")[![benxaamin](https://avatars.githubusercontent.com/u/21373088?v=4)](https://github.com/benxaamin "benxaamin (26 commits)")[![RahulDey12](https://avatars.githubusercontent.com/u/26340814?v=4)](https://github.com/RahulDey12 "RahulDey12 (12 commits)")[![nunomaduro](https://avatars.githubusercontent.com/u/5457236?v=4)](https://github.com/nunomaduro "nunomaduro (6 commits)")[![doekenorg](https://avatars.githubusercontent.com/u/529515?v=4)](https://github.com/doekenorg "doekenorg (6 commits)")[![amaelftah](https://avatars.githubusercontent.com/u/17250137?v=4)](https://github.com/amaelftah "amaelftah (4 commits)")[![richardkeep](https://avatars.githubusercontent.com/u/3874381?v=4)](https://github.com/richardkeep "richardkeep (3 commits)")[![dellow](https://avatars.githubusercontent.com/u/1047476?v=4)](https://github.com/dellow "dellow (2 commits)")[![filippofortino](https://avatars.githubusercontent.com/u/24780782?v=4)](https://github.com/filippofortino "filippofortino (2 commits)")[![lukadriel7](https://avatars.githubusercontent.com/u/10757342?v=4)](https://github.com/lukadriel7 "lukadriel7 (2 commits)")[![rjchauhan](https://avatars.githubusercontent.com/u/8499250?v=4)](https://github.com/rjchauhan "rjchauhan (2 commits)")[![stevenbdf](https://avatars.githubusercontent.com/u/35903969?v=4)](https://github.com/stevenbdf "stevenbdf (2 commits)")[![themsaid](https://avatars.githubusercontent.com/u/4332182?v=4)](https://github.com/themsaid "themsaid (2 commits)")[![dshoreman](https://avatars.githubusercontent.com/u/1521802?v=4)](https://github.com/dshoreman "dshoreman (2 commits)")[![ahme-d](https://avatars.githubusercontent.com/u/9767569?v=4)](https://github.com/ahme-d "ahme-d (2 commits)")[![eliurkis](https://avatars.githubusercontent.com/u/59236?v=4)](https://github.com/eliurkis "eliurkis (2 commits)")[![xiCO2k](https://avatars.githubusercontent.com/u/823088?v=4)](https://github.com/xiCO2k "xiCO2k (1 commits)")[![alexjose](https://avatars.githubusercontent.com/u/194099?v=4)](https://github.com/alexjose "alexjose (1 commits)")[![ankurk91](https://avatars.githubusercontent.com/u/6111524?v=4)](https://github.com/ankurk91 "ankurk91 (1 commits)")

---

Tags

laravelauthsanctum

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/xaamin-sanctum/health.svg)

```
[![Health](https://phpackages.com/badges/xaamin-sanctum/health.svg)](https://phpackages.com/packages/xaamin-sanctum)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.5k55.4M8.4k](/packages/larastan-larastan)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k29.9M146](/packages/laravel-cashier)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M131](/packages/laravel-pulse)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
