PHPackages                             charleskoko/sanctum-authentication - 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. charleskoko/sanctum-authentication

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

charleskoko/sanctum-authentication
==================================

This installs Laravel sanctum and generates everything needed for authentication

02PHP

Since Apr 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/charleskoko/sanctum-authentication-package)[ Packagist](https://packagist.org/packages/charleskoko/sanctum-authentication)[ RSS](/packages/charleskoko-sanctum-authentication/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Sanctum authentication package
==============================

[](#sanctum-authentication-package)

[![Issues](https://camo.githubusercontent.com/40af3fe30645c0b810989c5d13121956d576d1fa0b380fda2796e3b62fde0786/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f636861726c65736b6f6b6f2f73616e6374756d2d61757468656e7469636174696f6e2d7061636b6167653f7374796c653d666c61742d737175617265)](https://github.com/charleskoko/sanctum-authentication-package/issues)[![Forks](https://camo.githubusercontent.com/6072968f1c62b2ea33ef0ed94168b0b32f71967b116c5850377840c7fcaedc2d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f636861726c65736b6f6b6f2f73616e6374756d2d61757468656e7469636174696f6e2d7061636b6167653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/6072968f1c62b2ea33ef0ed94168b0b32f71967b116c5850377840c7fcaedc2d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f636861726c65736b6f6b6f2f73616e6374756d2d61757468656e7469636174696f6e2d7061636b6167653f7374796c653d666c61742d737175617265)[![Stars](https://camo.githubusercontent.com/1a132492c385d8316c810dc660edda6d27048cb285d140ff7386b6e83c66d171/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f636861726c65736b6f6b6f2f73616e6374756d2d61757468656e7469636174696f6e2d7061636b6167653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/1a132492c385d8316c810dc660edda6d27048cb285d140ff7386b6e83c66d171/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f636861726c65736b6f6b6f2f73616e6374756d2d61757468656e7469636174696f6e2d7061636b6167653f7374796c653d666c61742d737175617265)

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

[](#installation)

Sanctum authentication requires Laravel Sanctum. Before installing this package, you must have installed Laravel sanctum and made all configurations.

Package installation.

```
composer require charleskoko/sanctum-authentication
```

Then you have to publish the configuration files of Sanctum authentication package using the command vendor:publish Artisan. The Sanctum configuration file will be placed in the config directory of your application:

```
php artisan vendor:publish --provider="Charleskoko\SanctumAuthentication\SanctumAuthenticationServiceProvider"
```

Configuration
-------------

[](#configuration)

In the config file sanctumAuthentication.php of Sanctum authentication package, you can modify the following environment variables:

VariableROLERegistration rulesNecessary elements and validations rules for the creation of a userLogin rulesRequired elements and validation rules allowing the user to connectLogin attributeAttribute to check for the user's connectionApi uriApi url

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/292ae8da03b4043661fe2bb62f6d1369bd473a16ff8a7daa5cf56bbb70620450?d=identicon)[charleskoko](/maintainers/charleskoko)

---

Top Contributors

[![charleskoko](https://avatars.githubusercontent.com/u/55494612?v=4)](https://github.com/charleskoko "charleskoko (2 commits)")

### Embed Badge

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

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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