Bug fetch-user

This commit is contained in:
2025-06-05 11:13:46 +02:00
parent ed1786da65
commit 243b1290dc
2 changed files with 11 additions and 4 deletions

View File

@@ -38,9 +38,11 @@ var auth = createAuth({
router: driverRouterVueRouter
},
options:{
notFoundRedirect: '/auth/login',
authRedirect: '/auth/login',
loginData: {url: '/api/auth/login', method: 'POST', redirect: '/'},
// notFoundRedirect: '/auth/login',
// authRedirect: '/auth/login',
authRedirect: false, // niente redirect automatici
notFoundRedirect: false,
loginData: {url: '/api/auth/login', method: 'POST', redirect: '/home'},
logoutData: {url:'/api/auth/logout', redirect: '/auth/login'},
fetchData: {url: '/api/auth/fetch-user', method: 'GET', enabled: false},
refreshData: {url: '/api/auth/refresh-token', method: 'GET', enabled: false}

View File

@@ -6,6 +6,11 @@ const router = createRouter({
routes: [
{
path: '/',
redirect: '/auth/login',
meta: { auth: false }
},
{
path: '/home',
component: AppLayout,
meta: {
auth: true
@@ -17,7 +22,7 @@ const router = createRouter({
component: () => import('@/views/pages/ProjectList.vue')
},
{
path: '/',
path: '/home',
name: 'dashboard',
component: () => import('@/views/pages/ksDocuments/KsDocuments.vue')
},