mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-26 09:44:06 +00:00
fix: move WorkspaceAuthGate to LayoutDefault for proper re-login hand… (#8381)
## Summary - Move WorkspaceAuthGate from App.vue to LayoutDefault.vue so it only wraps authenticated routes - Change initialize() to run in onMounted() for proper Vue lifecycle - Restore immediate: true in cloudRemoteConfig watcher as backup - Gate now mounts fresh after login, fixing re-login feature flag issue The root cause was a race condition: after logout + page reload, the cloudRemoteConfig watcher could be set up after the user already logged in, missing the isLoggedIn change and never calling /features endpoint. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8381-fix-move-WorkspaceAuthGate-to-LayoutDefault-for-proper-re-login-hand-2f66d73d36508182a3dec09a49214a00) by [Unito](https://www.unito.io) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,15 +16,16 @@ useExtensionService().registerExtension({
|
||||
const { isLoggedIn } = useCurrentUser()
|
||||
const { isActiveSubscription } = useSubscription()
|
||||
|
||||
// Refresh config when subscription status changes
|
||||
// Initial auth-aware refresh happens in WorkspaceAuthGate before app renders
|
||||
// Refresh config when auth or subscription status changes
|
||||
// Primary auth refresh is handled by WorkspaceAuthGate on mount
|
||||
// This watcher handles subscription changes and acts as a backup for auth
|
||||
watchDebounced(
|
||||
[isLoggedIn, isActiveSubscription],
|
||||
() => {
|
||||
if (!isLoggedIn.value) return
|
||||
void refreshRemoteConfig()
|
||||
},
|
||||
{ debounce: 256 }
|
||||
{ debounce: 256, immediate: true }
|
||||
)
|
||||
|
||||
// Poll for config updates every 10 minutes (with auth)
|
||||
|
||||
Reference in New Issue
Block a user