fix(fe2): Small sso bugfuxes (#3571)

* Small bugfuxes

* Await loading
This commit is contained in:
andrewwallacespeckle
2024-11-28 09:45:37 +00:00
committed by GitHub
parent 4a0f69e184
commit 8fc111cb0a
2 changed files with 6 additions and 2 deletions
@@ -1,3 +1,4 @@
import { until } from '@vueuse/core'
import { workspaceRoute } from '~/lib/common/helpers/route'
import { useWorkspacePublicSsoCheck } from '~/lib/workspaces/composables/sso'
@@ -17,7 +18,8 @@ export default defineNuxtRouteMiddleware(async (to) => {
const { workspace, loading } = useWorkspacePublicSsoCheck(workspaceSlug)
if (loading.value) return
// Wait for loading to complete
await until(loading).toBe(false)
if (!workspace.value?.ssoProviderName) {
return navigateTo(workspaceRoute(workspaceSlug.value))
@@ -10,7 +10,9 @@
:default-logo-index="workspace.defaultLogoIndex"
size="xl"
/>
<h1 class="text-heading-xl">SSO is required for {{ workspace?.name }}</h1>
<h1 class="text-heading-xl text-center">
SSO is required for {{ workspace?.name }}
</h1>
<div
class="p-4 rounded-lg border border-outline-2 bg-foundation text-body-xs mb-2"
>