This module provides a simple way to use Laravel Sanctum with Nuxt. SSR-ready!
This module includes a range of features designed to streamline authentication:
useSanctumAuth composable for easy access to the current user and authentication methodsuseSanctumFetch and useLazySanctumFetch to load data from your APICSRF token header and cookie managementBearer token header managementCSR and SSR modes supportrequest and response interceptorssanctum:* hooks to react as you wantofetch clientWe recommend looking at our breeze-nuxt template that works flawlessly with breeze-api Laravel application with preconfigured Sanctum and Echo modules.
This project is a part of Nuxt Laravel modules ecosystem which you may find useful:
If you like this module, please support the project to help me maintain and improve it!