committed by
GitHub
parent
4a0f69e184
commit
8fc111cb0a
@@ -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"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user