nuxt-auth-sanctum v0.5.8
Nuxt Auth Sanctum
This module provides a simple way to use Laravel Sanctum with Nuxt by leveraging cookies-based authentication. SSR-ready!
Features
useSanctumAuth
composable for easy access to the current user and authentication methods- Automated
CSRF
token header and cookie management - Both
CSR
andSSR
modes support - Pre-configured middleware for pages that require authentication
- Cast current user information to any class you want
- Compatible with default Nuxt
ofetch
client - TypeScript support
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
- Add
nuxt-auth-sanctum
dependency to your project
npx nuxi@latest module add nuxt-auth-sanctum
- 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.
7 months ago
7 months ago
5 months ago
6 months ago
9 months ago
5 months ago
5 months ago
9 months ago
11 months ago
10 months ago
11 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
11 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago