mod for apigw

This commit is contained in:
andrea.terzani
2024-08-12 12:32:40 +02:00
parent c1d813cecb
commit 9067b3f617
2 changed files with 6 additions and 6 deletions

View File

@@ -39,14 +39,14 @@ var auth = createAuth({
options:{
notFoundRedirect: '/auth/login',
authRedirect: '/auth/login',
loginData: {url: 'api/auth/login', method: 'POST', redirect: '/'},
logoutData: {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}
}
});
axios.defaults.baseURL ='https://hermione-nu6mvqujsq-ey.a.run.app/' // import.meta.env.VITE_BACKEND_URL;
axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL;
const app = createApp(App);

View File

@@ -26,7 +26,7 @@ const login = async () => {
},
redirect:'/',
fetchUser: true,
url: '/api/auth/login'
//url: '/api/auth/login'
})
} catch (err) {
console.log( 'Error ' + err)