Getting Started

Introduction

Welcome to Nuxt Umbuzeiro module documentation

This module provides a simple way to use Laravel Sanctum and Laravel Passport with Nuxt. Ready for SSR!

Key Features

Nuxt-Umbu provides a complete authentication layer for Nuxt, built to work seamlessly with Laravel Sanctum and Laravel Passport — fully SSR compatible:

  • $auth instance available via const { $auth } = useNuxtApp()
  • $autx universal API client for authenticated requests
  • Automatic CSRF cookie and header handling (Sanctum)
  • Automatic Bearer token management (Passport)
  • Full SSR and CSR support
  • Built-in route middleware: auth and _2fa
  • Built-in authentication helpers (login, logout, register, 2FA)
  • Custom request and response interceptors
  • Compatible with Nuxt’s native ofetch
  • First-class TypeScript support
  • Supports both cookie-based (Sanctum) and token-based (Passport) authentication
  • Unified API for both drivers
  • ... and more, check the docs!