charleskoko/sanctum-authentication

This installs Laravel sanctum and generates everything needed for authentication

dev-master 2022-04-10 08:45 UTC

This package is auto-updated.

Last update: 2025-08-10 16:27:21 UTC


README

Issues Forks Stars

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