## Summary
Added Service Worker to inject Firebase auth headers into browser-native
`/api/view` requests (img, video, audio tags) for cloud distribution.
## Changes
- **What**: Implemented [Service
Worker](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API)
to intercept and authenticate media requests that cannot natively send
custom headers
- **Dependencies**: None (uses native Service Worker API)
## Implementation Details
**Tree-shaking**: Uses compile-time `isCloud` constant - completely
removed from localhost/desktop builds (verified via bundle analysis).
Verify yourself by building the app and `grep -r
"registerAuthServiceWorker\|setupAuth" dist/`
**Caching**: 50-minute auth header cache with automatic invalidation on
login/logout to prevent redundant token fetches.
**Message Flow**:
```mermaid
sequenceDiagram
participant IMG as Browser
participant SW as Service Worker
participant MT as Main Thread
participant FB as Firebase Auth
IMG->>SW: GET /api/view/image.png
SW->>SW: Check cache (50min TTL)
alt Cache miss
SW->>MT: REQUEST_AUTH_HEADER
MT->>FB: getAuthHeader()
FB-->>MT: Bearer token
MT-->>SW: AUTH_HEADER_RESPONSE
SW->>SW: Cache token
end
SW->>IMG: Fetch with Authorization header
Note over SW,MT: On login/logout: INVALIDATE_AUTH_HEADER
```
## Review Focus
- **Same-origin mode**: Service Worker uses `mode: 'same-origin'` to
allow custom headers (browser-native requests default to `no-cors` which
strips headers)
- **Request deduplication**: Prevents concurrent auth header requests
from timing out
- **Build verification**: Confirm `register-*.js` absent in localhost
builds, present (~3.2KB) in cloud builds
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6139-auth-add-service-worker-on-cloud-distribution-to-attach-auth-header-to-browser-native--2916d73d3650812698dccd07d943ab3c)
by [Unito](https://www.unito.io)
## Summary
This reverts PR #5614 which moved VueFire persistence configuration to
initialization.
## Reason for Revert
It breaks Google SSO login with error:
```
useErrorHandling.ts:12 FirebaseError: Firebase: Error (auth/argument-error).
at createErrorInternal (index-c92d61ad.js:506:41)
at _assert (index-c92d61ad.js:512:15)
at _withDefaultResolver (index-c92d61ad.js:9237:5)
at signInWithPopup (index-c92d61ad.js:9457:30)
at executeAuthAction.createCustomer (firebaseAuthStore.ts:263:25)
at executeAuthAction (firebaseAuthStore.ts:223:28)
at Proxy.loginWithGoogle (firebaseAuthStore.ts:262:5)
at Proxy.wrappedAction (pinia.mjs:1405:26)
at useFirebaseAuthActions.ts:104:28
at Object.signInWithGoogle (useErrorHandling.ts:39:22)
```
## Changes
- Reverts commit ea4e57b60 "Move VueFire persistence configuration to
initialization (#5614)"
- Restores previous Firebase auth persistence behavior
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5729-Revert-Move-VueFire-persistence-configuration-to-initialization-5614-2776d73d3650814c9b80d9c67c852874)
by [Unito](https://www.unito.io)
* temp: move tailwind calls out of the layer
* temp: ts tailwind config
* upgrade: Tailwind v4
This got a little out of hand.
Had to add a relative reference to the stylesheet in any component that uses @apply instead of the utility classes directly.
* upgrade: bg-opacity is now a modifier
* fix: Classic menu buttons assume a border
* Update test expectations [skip ci]
* fix: New preflight removal pattern
* fix: Skeletons don't have skin
* Update test expectations [skip ci]
* fix: Missing @reference
* [auto-fix] Apply ESLint and Prettier fixes
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: GitHub Action <action@github.com>
- Updated all imports from '@comfyorg/litegraph' to '@/lib/litegraph/src/'
- Replaced deep dist imports with direct source paths
- Updated CSS import in main.ts
- All imports now use the @ alias consistently
* (fix) index.html formating for prettier
* (add) proper icon management
- on-demand icons auto importing
- handle all available icon sets (https://icones.js.org)
* (fix) proper css management
* (add) front stack improvement:
- implement vue router
- prepare for App.vue simplification
- proper management of views and layouts
- fix Tailwind CSS and prepare for overall css cleaning
* (fix) move back user.css to public dir
* (fix) remove user.css import from main.ts
* fix: vite primevue/treenode import error
* refactor: remove useless @ts-ignore and replace with @ts-expect-error
* build(tsconfig): enable incremental to speed up secondary time type check
* Basic side tool bar skeleton + Theme toggle (#164)
* Side bar skeleton
* Fix grid layout
* nit
* Add theme toggle logic
* Change primevue color theme to blue to match beta menu UI
* Add litegraph canvas splitter overlay (#177)
* Add vue wrapper
* Splitter overlay
* Move teleport to side bar comp
* Toolbar placeholder
* Move settings button from top menu to side bar (#178)
* Reverse relationship between splitter overlay and sidebar component (#180)
* Reverse relationship between splitter overlay and sidebar component
* nit
* Remove border on splitter
* Fix canvas shift (#186)
* Move queue/history display to side bar (#185)
* Side bar placeholder
* Pinia store for queue items
* Flatten task item
* Fix schema
* computed
* Switch running / pending order
* Use class-transformer
* nit
* Show display status
* Add tag severity style
* Add execution time
* nit
* Rename to execution success
* Add time display
* Sort queue desc order
* nit
* Add remove item feature
* Load workflow
* Add confirmation popup
* Add empty table placeholder
* Remove beta menu UI's queue button/list
* Add tests on litegraph widget text truncate (#191)
* Add tests on litegraph widget text truncate
* Updated screenshots
* Revert port change
* Remove screenshots
* Update test expectations [skip ci]
* Add back menu.settingsGroup for compatibility (#192)
* Close side bar on menu location set as disabled (#194)
* Remove placeholder side bar tabs (#196)
---------
Co-authored-by: bymyself <abolkonsky.rem@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>