mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 10:59:53 +00:00
## 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)
72 lines
1.9 KiB
TypeScript
72 lines
1.9 KiB
TypeScript
import { definePreset } from '@primevue/themes'
|
|
import Aura from '@primevue/themes/aura'
|
|
import * as Sentry from '@sentry/vue'
|
|
import { initializeApp } from 'firebase/app'
|
|
import { createPinia } from 'pinia'
|
|
import 'primeicons/primeicons.css'
|
|
import PrimeVue from 'primevue/config'
|
|
import ConfirmationService from 'primevue/confirmationservice'
|
|
import ToastService from 'primevue/toastservice'
|
|
import Tooltip from 'primevue/tooltip'
|
|
import { createApp } from 'vue'
|
|
import { VueFire, VueFireAuth } from 'vuefire'
|
|
|
|
import { FIREBASE_CONFIG } from '@/config/firebase'
|
|
import '@/lib/litegraph/public/css/litegraph.css'
|
|
import router from '@/router'
|
|
|
|
import App from './App.vue'
|
|
// Intentionally relative import to ensure the CSS is loaded in the right order (after litegraph.css)
|
|
import './assets/css/style.css'
|
|
import { i18n } from './i18n'
|
|
|
|
const ComfyUIPreset = definePreset(Aura, {
|
|
semantic: {
|
|
// @ts-expect-error fixme ts strict error
|
|
primary: Aura['primitive'].blue
|
|
}
|
|
})
|
|
|
|
const firebaseApp = initializeApp(FIREBASE_CONFIG)
|
|
|
|
const app = createApp(App)
|
|
const pinia = createPinia()
|
|
Sentry.init({
|
|
app,
|
|
dsn: __SENTRY_DSN__,
|
|
enabled: __SENTRY_ENABLED__,
|
|
release: __COMFYUI_FRONTEND_VERSION__,
|
|
integrations: [],
|
|
autoSessionTracking: false,
|
|
defaultIntegrations: false,
|
|
normalizeDepth: 8,
|
|
tracesSampleRate: 0
|
|
})
|
|
app.directive('tooltip', Tooltip)
|
|
app
|
|
.use(router)
|
|
.use(PrimeVue, {
|
|
theme: {
|
|
preset: ComfyUIPreset,
|
|
options: {
|
|
prefix: 'p',
|
|
cssLayer: {
|
|
name: 'primevue',
|
|
order: 'theme, base, primevue'
|
|
},
|
|
// This is a workaround for the issue with the dark mode selector
|
|
// https://github.com/primefaces/primevue/issues/5515
|
|
darkModeSelector: '.dark-theme, :root:has(.dark-theme)'
|
|
}
|
|
}
|
|
})
|
|
.use(ConfirmationService)
|
|
.use(ToastService)
|
|
.use(pinia)
|
|
.use(i18n)
|
|
.use(VueFire, {
|
|
firebaseApp,
|
|
modules: [VueFireAuth()]
|
|
})
|
|
.mount('#vue-app')
|