Laravel Sanctum is an official package for API authentication. It provides Simple token base API auth, Token issuing, Token Abilities, Authentication for Mobile application and more.

Introduction

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.

How it works?

Laravel Sanctum provides two different options to generating tokens. First, it is a simple package to issue API tokens to your users without the complication of OAuth. This is inspired by GitHub “access tokens”. Second it offers a simple way to authenticate single page applications (SPAs) that need to communicate with Laravel powered API.

You may also Like