Skip to content
프로젝트

소개

Laravel Sanctum 인증을 위한 Nuxt 모듈입니다.

웹 및 앱 개발

이 수치를 측정하는 방법

What you can do

  • useSanctumAuth composable for easy access to the current user and authentication methods
  • useSanctumFetch and useLazySanctumFetch to load data from your API
  • Automated CSRF token header and cookie management
  • Automated Bearer token header management

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Nuxt Auth Sanctum

npm version npm downloads License Nuxt

This module provides a simple way to use Laravel Sanctum with Nuxt by leveraging cookies-based authentication. SSR-ready!

Features

This module includes a range of features designed to streamline authentication:

  • useSanctumAuth composable for easy access to the current user and authentication methods
  • useSanctumFetch and useLazySanctumFetch to load data from your API
  • Automated CSRF token header and cookie management
  • Automated Bearer token header management
  • Both CSR and SSR modes support
  • Pre-configured middleware for pages that require authentication
  • Cast current user information to any class you want
  • Custom request and response interceptors
  • Subscribe to sanctum:* hooks to react as you want
  • Compatible with default Nuxt ofetch client
  • TypeScript support
  • ... and more, check the docs!

Note: Before using this module, please make sure that you have already configured Laravel Sanctum on your backend. You can find more information about Laravel Sanctum here.

Complete documentation - Nuxt Auth Sanctum docs

Quick Setup

  1. Add nuxt-auth-sanctum dependency to your project
npx nuxi@latest module add nuxt-auth-sanctum
  1. Add any required configuration in your nuxt.config.ts file
export default defineNuxtConfig({
  modules: ["nuxt-auth-sanctum"],

  sanctum: {
    baseUrl: "http://localhost:80", // Laravel API
  },
});

That's it! You can now use Nuxt Auth Sanctum in your Nuxt app ✨

For more details, check the documentation here

Powered by

JetBrains logo.

관련 프로젝트 살펴보기

불러오는 중…