Bug fetch-user login

This commit is contained in:
2025-06-05 10:52:56 +02:00
parent 8592f61a43
commit aeb787b4a4
2 changed files with 10 additions and 3 deletions

View File

@@ -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}

View File

@@ -7,6 +7,11 @@ const router = createRouter({
routes: [
{
path: '/',
redirect: '/auth/login',
meta: { auth: false }
},
{
path: '/home',
component: AppLayout,
meta: {
auth: true