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:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user