Nuxt Auth Sanctum
Nuxt Module for Laravel Sanctum Authentication
Description
Nuxt Module for Laravel Sanctum Authentication
This module offers a streamlined way to integrate Laravel Sanctum with Nuxt, utilizing cookie‑based authentication that is ready for server‑side rendering.
useSanctumAuthcomposable: easily access the current user and perform authentication actions.useSanctumFetch&useLazySanctumFetch: fetch data from your API effortlessly.- Automatic handling of CSRF token headers and cookie management.
- Automatic Bearer token header management.
- Supports both CSR (Client‑Side Rendering) and SSR (Server‑Side Rendering).
- Pre‑configured middleware for pages that require authentication.
- Ability to cast the current user information into any class you choose.
- Custom request and response interceptors.
- Subscribe to
sanctum:*hooks to trigger custom behavior. - Compatible with Nuxt’s default
ofetchclient. - Full TypeScript support.
- ...and more!
Creator
Artem Manchenkov
@AManchenkov
@manchenkoff.bsky.social
Related Projects
ScriptShifter
Auto-convert Vue Components from Options API to Script Setup
rstore
Reactive Data Store
Nuxt MCP Toolkit
Expose your Nuxt App to any LLM
vue.ts
Enhanced TypeScript Support for Vue.js
vue-flow-vis
Vue Reactivity Tracker
Vue Hotkeys
Shortcut Library