mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-24 22:58:08 +00:00
## Summary Add dedicated auth token priority tests and reconcile workspace token resolution between `authStore` and `workspaceAuthStore`. ## Changes - **What**: Created `src/stores/__tests__/authTokenPriority.test.ts` with 6 scenarios covering the full priority chain: workspace token → Firebase token → API key → null. Added `getWorkspaceToken()` method to `workspaceAuthStore`. Replaced raw `sessionStorage` reads in `authStore` with proper store delegation. - **Files**: 3 files changed (+ 1 new test file) ## Review Focus - Token priority chain in `authTokenPriority.test.ts` — validates workspace > Firebase > API key ordering - The `getAuthToken()` and `getAuthHeader()` methods now delegate to `workspaceAuthStore` instead of reading sessionStorage directly ## Stack PR 3/5: #10483 → #10484 → **→ This PR** → #10486 → #10487 Co-authored-by: Alexander Brown <drjkl@comfy.org>