Nuxt Module for Laravel Sanctum Authentication
"This module provides a simple way to use Laravel Sanctum with Nuxt by leveraging cookies-based authentication. SSR-ready!"
useSanctumAuthcomposable for easy access to the current user and authentication methodsuseSanctumFetchanduseLazySanctumFetchto load data from your API- Automated
CSRFtoken header and cookie management- Automated
Bearertoken header management- Both
CSRandSSRmodes support- Pre-configured middleware for pages that require authentication
- Cast current user information to any class you want
- Custom
requestandresponseinterceptors- Subscribe to
sanctum:*hooks to react as you want- Compatible with default Nuxt
ofetchclient- TypeScript support
- ... and more!
Artem Manchenkov
@AManchenkov
@manchenkoff.bsky.social