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