charleskoko / sanctum-authentication
This installs Laravel sanctum and generates everything needed for authentication
Package info
github.com/charleskoko/sanctum-authentication-package
pkg:composer/charleskoko/sanctum-authentication
This package is auto-updated.
Last update: 2026-03-10 17:45:26 UTC
README
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
In the config file sanctumAuthentication.php of Sanctum authentication package, you can modify the following environment variables:
| Variable | ROLE |
|---|---|
| Registration rules | Necessary elements and validations rules for the creation of a user |
| Login rules | Required elements and validation rules allowing the user to connect |
| Login attribute | Attribute to check for the user's connection |
| Api uri | Api url |