mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-05 05:00:03 +00:00
Fix subscription dialog appearing during onboarding (#6367)
Fixes subscription dialog incorrectly appearing on cloud onboarding pages (email verification, survey, waitlist). Root cause: logout uses SPA routing leaving extensions with stale auth state. Solution: (1) use full page navigation for logout to reset app state, (2) add defensive route guard to skip subscription checks on /cloud/* paths. Prevents subscription modal from showing during account switching and onboarding flows. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6367-Fix-subscription-dialog-appearing-during-onboarding-29b6d73d3650818d88e0d59ade7de02e) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
import { useCurrentUser } from '@/composables/auth/useCurrentUser'
|
||||
import { useFirebaseAuthActions } from '@/composables/auth/useFirebaseAuthActions'
|
||||
@@ -108,6 +109,14 @@ export function useSubscription() {
|
||||
}
|
||||
|
||||
const requireActiveSubscription = async (): Promise<void> => {
|
||||
// DEFENSIVE: Never show subscription dialogs during onboarding flows
|
||||
// All cloud onboarding routes start with '/cloud/' (login, signup, survey, waitlist, etc.)
|
||||
// This prevents subscription enforcement from interfering with user onboarding
|
||||
const route = useRoute()
|
||||
if (route.path.startsWith('/cloud/')) {
|
||||
return
|
||||
}
|
||||
|
||||
await fetchSubscriptionStatus()
|
||||
|
||||
if (!isActiveSubscription.value) {
|
||||
|
||||
Reference in New Issue
Block a user