File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,10 @@ const VueFire: NuxtModule<VueFireNuxtModuleOptions> =
113113 }
114114
115115 nuxt . hook ( 'modules:done' , ( ) => {
116+ addPlugin ( resolve ( runtimeDir , 'plugins/admin.server' ) )
117+
118+ addPlugin ( resolve ( runtimeDir , 'plugins/auth.client' ) )
119+
116120 // plugin are added in reverse order
117121 addPluginTemplate ( {
118122 src : normalize ( resolve ( templatesDir , 'plugin.ejs' ) ) ,
@@ -122,7 +126,6 @@ const VueFire: NuxtModule<VueFireNuxtModuleOptions> =
122126 ssr : nuxt . options . ssr ,
123127 } ,
124128 } )
125- addPlugin ( resolve ( runtimeDir , 'plugins/admin.server' ) )
126129 addPlugin ( resolve ( runtimeDir , 'plugins/app' ) )
127130 } )
128131 } ,
Original file line number Diff line number Diff line change 1+ import type { FirebaseApp } from '@firebase/app-types'
2+ import { VueFireAuth } from 'vuefire'
3+ import { defineNuxtPlugin } from '#app'
4+
5+ /**
6+ * Initializes the app and provides it to others.
7+ */
8+
9+ export default defineNuxtPlugin ( ( nuxtApp ) => {
10+ const firebaseApp = nuxtApp . $firebaseApp as FirebaseApp
11+
12+ VueFireAuth ( ) ( firebaseApp , nuxtApp . vueApp )
13+ } )
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export default defineNuxtPlugin((nuxtApp) => {
4343 const modules = []
4444
4545 <% if (options .auth ) { % >
46- // Auth
46+ // modules.push(VueFireAuth())
4747 < % } %>
4848
4949 <% if (options .appCheck ) { % >
You can’t perform that action at this time.
0 commit comments