Open tmountjr opened 2 years ago
Did some further testing with an isolated repo that I could share (rather than one filled with my app-specific pages). Tested using both node 14 and 16 (the linked repo has a .nvmrc
file pinning to 16.something) in case it was a weird artifact of my node version, still same error as before.
Version
@nuxtjs/firebase: 8.2.2 firebase: 9.9.2 nuxt: 2.15.8
Reproduction Link
Repo with minimal code
Steps to reproduce
Error occurs running
nuxt dev
.nuxt.config.js:
Also have a
.env
file where those environment variables are spelled out, as well as settingGOOGLE_APPLICATION_CREDENTIALS
to the admin key.For
firebase.services.auth.ssr.credential
, I've tried bothtrue
and a full path to the credential file. In my testing, removingfirebase.services.auth.ssr.serverLogin
allows the app to build properly, but the admin credentials are not used on the server side when loading data.What is Expected?
I'm running an app that uses Firebase Auth to make sure that the person logging in is authorized to see the data, and then Realtime DB to fetch/store the data. Right now the rules are set so everyone has read access and no one has write access (a separate console app with the admin SDK writes to the database). I want to use server-side authentication following this guide but changing
firebase.services.auth.ssr
fromtrue
to{ credential: true, serverLogin: true }
causes a webpack error during the build (exact error below).What is actually happening?
Receive this console error: