You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'[VueFire]: Missing firebase "admin" config. Provide an "admin" option to the VueFire module options. This is necessary to use the auth or app-check module.'
// we start the admin app first so we can have access to the user uid everywhere
171
-
if(options.admin){
161
+
// TODO: if options.admin
162
+
if(options.admin||nuxt.options.ssr){
172
163
if(!nuxt.options.ssr){
173
164
console.warn(
174
165
'[VueFire]: The "admin" option is only used during SSR. You should reenable ssr to use it.'
175
166
)
176
167
}
168
+
// TODO: check env variables are present
169
+
170
+
// This one is set by servers, we set the GOOGLE_APPLICATION_CREDENTIALS env variable instead that has a lower priority and can be both a path or a JSON string
'[VueFire]: using GOOGLE_APPLICATION_CREDENTIALS env variable'
50
+
)
51
+
// automatically picks up the service account file path from the env variable
52
+
credential=applicationDefault()
53
+
}else{
54
+
// TODO: add link to docs
55
+
console.warn(`\
56
+
[VueFire]: You must provide an "admin.serviceAccount" path to your json so it's picked up during development. See https://firebase.google.com/docs/admin/setup#initialize-sdk for more information. Note that you can also set the GOOGLE_APPLICATION_CREDENTIALS env variable to a full resolved path or a JSON string.
57
+
You can also set the FIREBASE_CLIENT_EMAIL, FIREBASE_PRIVATE_KEY and FIREBASE_PROJECT_ID env variables in production if you are deploying to something else than Firebase Cloud Functions.
'[VueFire]: You must provide a "serviceAccount" (dev) or set the FIREBASE_CLIENT_EMAIL, FIREBASE_PRIVATE_KEY and FIREBASE_PROJECT_ID env variables production.'
0 commit comments