Bug fetch-user login
This commit is contained in:
@@ -41,9 +41,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}
|
||||
|
||||
@@ -7,6 +7,11 @@ const router = createRouter({
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/auth/login',
|
||||
meta: { auth: false }
|
||||
},
|
||||
{
|
||||
path: '/home',
|
||||
component: AppLayout,
|
||||
meta: {
|
||||
auth: true
|
||||
|
||||
Reference in New Issue
Block a user