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 which specify which actions the tokens are allowed to perform.

Make sure you have already installed it by the composer

BASH
composer require laravel/sanctum
BASH
composer update

Read more about Laravel Sanctum integration step by step

Laravel Sanctum with JavaScript

Laravel Sanctum official doc