Introduction
This module provides a simple way to use Laravel Sanctum with Nuxt. SSR-ready!
This website is deprecated and will soon be deleted. Please refer to https://sanctum.manchenkoff.me for the latest documentation.
Top Features
useSanctumAuthcomposable for easy access to the current user and authentication methodsuseSanctumFetchanduseLazySanctumFetchto load data from your APIAutomated
CSRFtoken header and cookie managementAutomated
Bearertoken header managementBoth
CSRandSSRmodes supportPre-configured middleware for pages that require authentication
Cast current user information to any class you want
Custom request and response interceptors
Subscribe to
sanctum:*hooks to react as you wantCompatible with default Nuxt
ofetchclientTypeScript support
... and more, check the docs!
Note: Before using this module, please ensure you have configured Laravel Sanctum on your backend. You can find more information about Laravel Sanctum here.
We recommend looking at our breeze-nuxt template that works flawlessly with breeze-api Laravel application.
Support
If you use this module, please support me to help to maintain and improve it!
Last updated
