Bug fetch-user
This commit is contained in:
@@ -38,9 +38,11 @@ var auth = createAuth({
|
|||||||
router: driverRouterVueRouter
|
router: driverRouterVueRouter
|
||||||
},
|
},
|
||||||
options:{
|
options:{
|
||||||
notFoundRedirect: '/auth/login',
|
// notFoundRedirect: '/auth/login',
|
||||||
authRedirect: '/auth/login',
|
// authRedirect: '/auth/login',
|
||||||
loginData: {url: '/api/auth/login', method: 'POST', redirect: '/'},
|
authRedirect: false, // niente redirect automatici
|
||||||
|
notFoundRedirect: false,
|
||||||
|
loginData: {url: '/api/auth/login', method: 'POST', redirect: '/home'},
|
||||||
logoutData: {url:'/api/auth/logout', redirect: '/auth/login'},
|
logoutData: {url:'/api/auth/logout', redirect: '/auth/login'},
|
||||||
fetchData: {url: '/api/auth/fetch-user', method: 'GET', enabled: false},
|
fetchData: {url: '/api/auth/fetch-user', method: 'GET', enabled: false},
|
||||||
refreshData: {url: '/api/auth/refresh-token', method: 'GET', enabled: false}
|
refreshData: {url: '/api/auth/refresh-token', method: 'GET', enabled: false}
|
||||||
|
|||||||
@@ -6,6 +6,11 @@ const router = createRouter({
|
|||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
|
redirect: '/auth/login',
|
||||||
|
meta: { auth: false }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/home',
|
||||||
component: AppLayout,
|
component: AppLayout,
|
||||||
meta: {
|
meta: {
|
||||||
auth: true
|
auth: true
|
||||||
@@ -17,7 +22,7 @@ const router = createRouter({
|
|||||||
component: () => import('@/views/pages/ProjectList.vue')
|
component: () => import('@/views/pages/ProjectList.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/home',
|
||||||
name: 'dashboard',
|
name: 'dashboard',
|
||||||
component: () => import('@/views/pages/ksDocuments/KsDocuments.vue')
|
component: () => import('@/views/pages/ksDocuments/KsDocuments.vue')
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user