diff --git a/app/src/router.ts b/app/src/router.ts index 9687bf2adb..1feb696005 100644 --- a/app/src/router.ts +++ b/app/src/router.ts @@ -62,12 +62,15 @@ export const router = createRouter({ routes: defaultRoutes, }); +let firstLoad = true; + export const onBeforeEach: NavigationGuard = async (to, from) => { const appStore = useAppStore(); const serverStore = useServerStore(); // First load - if (from.name === undefined) { + if (firstLoad) { + firstLoad = false; // Try retrieving a fresh access token on first load try { await refresh({ navigate: false });