feat: Address 404 errors and session management issues, improve authorization middleware to use cached auth state, and adjust auth refresh plugin for better session validation

This commit is contained in:
2025-07-11 15:05:59 -04:00
parent 7ee2cb3368
commit eb1d853327
4 changed files with 100 additions and 29 deletions

View File

@@ -115,8 +115,15 @@ const nuxtApp = useNuxtApp();
const drawer = ref(true);
const rail = ref(false);
// Get auth state
const authState = computed(() => nuxtApp.payload.data?.authState);
// Get auth state - with fallback to prevent errors
const authState = computed(() => {
const data = nuxtApp.payload?.data?.authState;
// Only return data if it's properly initialized
if (data && data.authenticated !== undefined) {
return data;
}
return null;
});
// Page title based on current route
const pageTitle = computed(() => {