diff --git a/app/middleware/signin-page.ts b/app/middleware/signin-page.ts deleted file mode 100644 index 746fa2f..0000000 --- a/app/middleware/signin-page.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default defineNuxtRouteMiddleware((to) => { - if (import.meta.client) { - const { isAuthenticated } = useKeycloak() - const localePath = useLocalePath() - - if (isAuthenticated.value && to.path === localePath('/auth/signin')) { - return navigateTo(localePath('/')) - } - } -}) diff --git a/app/pages/dashboard.vue b/app/pages/dashboard.vue index 1488339..7c0961c 100644 --- a/app/pages/dashboard.vue +++ b/app/pages/dashboard.vue @@ -2,7 +2,7 @@ const productStore = useUserProductsStore() const { t } = useI18n() const localePath = useLocalePath() -const { clearLoginRedirectUrl } = useKeycloak() +const { clearLoginRedirectUrl, setLogoutRedirectUrl } = useKeycloak() useHead({ title: t('page.dashboard.title') @@ -15,12 +15,16 @@ definePageMeta({ const helpHref = 'https://www2.gov.bc.ca/gov/content/employment-business/business/managing-a-business/permits-licences/news-updates/modernization-updates/modernization-resources' onMounted(async () => { + const config = useRuntimeConfig().public + clearLoginRedirectUrl() + setLogoutRedirectUrl(config.baseURL) + + await productStore.getUserProducts() + setBreadcrumbs([ { to: localePath('/'), label: t('ConnectBreadcrumb.default') }, { label: t('page.dashboard.h1') } ]) - await productStore.getUserProducts() - clearLoginRedirectUrl() })