mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-03 12:10:11 +00:00
Feat/workspaces 5 auth gate check (#8350)
## Summary - Fix auth related race conditions with a new WorkspaceAuthGate in App.vue - De dup initialization calls - Add state machine to track state of refreshRemoteConfig - Fix websocket not using new workspace jwt - Misc improvments ## Changes - **What**: Mainly WorkspaceAuthGate.vue - **Breaking**: <!-- Any breaking changes (if none, remove this line) --> - **Dependencies**: <!-- New dependencies (if none, remove this line) --> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8350-Feat-workspaces-5-auth-gate-check-2f66d73d365081b1a49afcd418fab3e7) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -521,10 +521,11 @@ export class ComfyApi extends EventTarget {
|
||||
}
|
||||
|
||||
// Get auth token and set cloud params if available
|
||||
// Uses workspace token (if enabled) or Firebase token
|
||||
if (isCloud) {
|
||||
try {
|
||||
const authStore = await this.getAuthStore()
|
||||
const authToken = await authStore?.getIdToken()
|
||||
const authToken = await authStore?.getAuthToken()
|
||||
if (authToken) {
|
||||
params.set('token', authToken)
|
||||
}
|
||||
|
||||
@@ -1349,8 +1349,9 @@ export class ComfyApp {
|
||||
const executionStore = useExecutionStore()
|
||||
executionStore.lastNodeErrors = null
|
||||
|
||||
let comfyOrgAuthToken = await useFirebaseAuthStore().getIdToken()
|
||||
let comfyOrgApiKey = useApiKeyAuthStore().getApiKey()
|
||||
// Get auth token for backend nodes - uses workspace token if enabled, otherwise Firebase token
|
||||
const comfyOrgAuthToken = await useFirebaseAuthStore().getAuthToken()
|
||||
const comfyOrgApiKey = useApiKeyAuthStore().getApiKey()
|
||||
|
||||
try {
|
||||
while (this.queueItems.length) {
|
||||
|
||||
Reference in New Issue
Block a user