Nuxt Auth Sanctum

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.

  • useSanctumAuth composable: 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 ofetch client.
  • Full TypeScript support.
  • ...and more!

Creator

Artem Manchenkov
@AManchenkov
@manchenkoff.bsky.social

Related Projects

ScriptShifter

ScriptShifter

Auto-convert Vue Components from Options API to Script Setup

rstore

rstore

Reactive Data Store

Nuxt MCP Toolkit

Nuxt MCP Toolkit

Expose your Nuxt App to any LLM

vue.ts

vue.ts

Enhanced TypeScript Support for Vue.js

vue-flow-vis

vue-flow-vis

Vue Reactivity Tracker

Vue Hotkeys

Vue Hotkeys

Shortcut Library