Ensure no middleware for sso (#4118)

This commit is contained in:
andrewwallacespeckle
2025-03-05 15:45:33 +00:00
committed by GitHub
parent c1ad992eff
commit 709b87b0fa
3 changed files with 6 additions and 3 deletions
@@ -9,7 +9,8 @@ import { convertThrowIntoFetchResult } from '~~/lib/common/helpers/graphql'
*/
export default defineNuxtRouteMiddleware(async (to) => {
const isAuthPage = to.path.startsWith('/authn/')
if (isAuthPage) return
const isSSOPath = to.path.includes('/sso/')
if (isAuthPage || isSSOPath) return
const client = useApolloClientFromNuxt()
const { data: emailData } = await client
@@ -9,7 +9,8 @@ import { homeRoute, onboardingRoute } from '~~/lib/common/helpers/route'
*/
export default defineNuxtRouteMiddleware(async (to) => {
const isAuthPage = to.path.startsWith('/authn/')
if (isAuthPage) return
const isSSOPath = to.path.includes('/sso/')
if (isAuthPage || isSSOPath) return
const client = useApolloClientFromNuxt()
const { data } = await client
@@ -9,7 +9,8 @@ import { workspaceCreateRoute, workspaceJoinRoute } from '~~/lib/common/helpers/
*/
export default defineNuxtRouteMiddleware(async (to) => {
const isAuthPage = to.path.startsWith('/authn/')
if (isAuthPage) return
const isSSOPath = to.path.includes('/sso/')
if (isAuthPage || isSSOPath) return
const isOnboardingForced = useIsOnboardingForced()
const isWorkspaceNewPlansEnabled = useWorkspaceNewPlansEnabled()