You've already forked isop-mirror
feat: add nuxt-auth-sanctum for Laravel Sanctum authentication
This commit is contained in:
3
frontend/app/pages/dashboard/index.vue
Normal file
3
frontend/app/pages/dashboard/index.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
@@ -10,7 +10,8 @@ export default defineNuxtConfig({
|
||||
// externé moduly
|
||||
modules: [
|
||||
'@nuxt/image', // na obrázky
|
||||
'vuetify-nuxt-module' // Vuetify
|
||||
'vuetify-nuxt-module', // Vuetify
|
||||
'nuxt-auth-sanctum' // Laravel Sanctum auth
|
||||
],
|
||||
|
||||
nitro: {
|
||||
@@ -19,4 +20,17 @@ export default defineNuxtConfig({
|
||||
routes: ["/", "/info/student", "/info/company", "/register", "/about"],
|
||||
},
|
||||
},
|
||||
|
||||
sanctum: {
|
||||
baseUrl: 'http://localhost:8000',
|
||||
origin: 'http://localhost:3000',
|
||||
redirect: {
|
||||
onLogin: '/dashboard',
|
||||
onLogout: "/",
|
||||
onAuthOnly: '/login',
|
||||
keepRequestedRoute: false,
|
||||
onGuestOnly: false,
|
||||
},
|
||||
redirectIfAuthenticated: true
|
||||
},
|
||||
});
|
||||
12
frontend/package-lock.json
generated
12
frontend/package-lock.json
generated
@@ -9,6 +9,7 @@
|
||||
"dependencies": {
|
||||
"@nuxt/image": "^1.11.0",
|
||||
"nuxt": "^4.1.3",
|
||||
"nuxt-auth-sanctum": "^1.4.1",
|
||||
"vue": "^3.5.22",
|
||||
"vue-router": "^4.5.1",
|
||||
"vuetify-nuxt-module": "^0.18.8"
|
||||
@@ -7645,6 +7646,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/nuxt-auth-sanctum": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/nuxt-auth-sanctum/-/nuxt-auth-sanctum-1.4.1.tgz",
|
||||
"integrity": "sha512-QKD39eSRVsqdhGMv1BGmZ+zG3Vn2Xy1C73lf7X/Hd3EuKgne8WPPv5ZwrvVU6SwbxtYnqA1xUC97oRFoTLsAcQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"defu": "^6.1.4",
|
||||
"ofetch": "^1.4.1",
|
||||
"pathe": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/nypm": {
|
||||
"version": "0.6.2",
|
||||
"resolved": "https://registry.npmjs.org/nypm/-/nypm-0.6.2.tgz",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"dependencies": {
|
||||
"@nuxt/image": "^1.11.0",
|
||||
"nuxt": "^4.1.3",
|
||||
"nuxt-auth-sanctum": "^1.4.1",
|
||||
"vue": "^3.5.22",
|
||||
"vue-router": "^4.5.1",
|
||||
"vuetify-nuxt-module": "^0.18.8"
|
||||
|
||||
Reference in New Issue
Block a user