Update auth

This commit is contained in:
2025-06-04 13:41:39 +02:00
parent 6104a43814
commit 581e565c6c

View File

@@ -14,13 +14,10 @@ import Nora from '@primevue/themes/nora';
import PrimeVue from 'primevue/config';
import ConfirmationService from 'primevue/confirmationservice';
import ToastService from 'primevue/toastservice';
import BlockViewer from '@/components/BlockViewer.vue';
import '@/assets/styles.scss';
import '@/assets/tailwind.css';
import { config } from 'md-editor-v3';
import { LoadingStore } from './stores/LoadingStore.js';
@@ -46,18 +43,14 @@ var auth = createAuth({
options:{
notFoundRedirect: '/auth/login',
authRedirect: '/auth/login',
/* loginData: {url: '../api/auth/login', method: 'POST', redirect: '/'},
logoutData: {url:'../api/auth/logout', redirect: '/auth/login'},
fetchData: {url: '../api/auth/fetch-user', method: 'GET', enabled: true},
refreshData: {url: '../api/auth/refresh-token', method: 'GET', enabled: true}*/
loginData: {url: '/api/auth/login', method: 'POST', redirect: '/'},
logoutData: {url:'/api/auth/logout', redirect: '/auth/login'},
fetchData: {url: '/api/auth/fetch-user', method: 'GET', enabled: true},
refreshData: {url: '/api/auth/refresh-token', method: 'GET', enabled: true}
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}
}
});
axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL;//'http://localhost:8081'///
axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL;
//axios.defaults.baseURL ='http://localhost:8081';
@@ -153,8 +146,7 @@ app.component('BlockViewer', BlockViewer);
app.mount('#app');
const loadingStore = LoadingStore()
const loadingStore = LoadingStore();
axios.interceptors.request.use(function (config) {
loadingStore.another_loading = true;