Introduction
This module provides a simple way to use Laravel Sanctum with Nuxt. SSR-ready!
Top Features
useSanctumAuth
composable for easy access to the current user and authentication methodsAutomated
CSRF
token header and cookie managementAutomated
Bearer
token header managementBoth
CSR
andSSR
modes supportPre-configured middleware for pages that require authentication
Cast current user information to any class you want
Compatible with default Nuxt
ofetch
clientTypeScript support
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 like this module, please support the project to help me to maintain and improve it!