Bug fetch-user
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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')
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user