I have a problem with setting up @nuxt/firebase because whenever I try to access firestore I get the error: Missing or insufficient permissions.
This was obviously not happening while I had test firestore rules in place that allowed any access. However, The firebase docs state that the Admin SDK should always be able to access firestore even if rules are set to deny access. Can someone help in tracking down this issue? Many thanks!
firebase: {
config: {
apiKey: process.env.FIREBASE_API_KEY,
authDomain: process.env.FIREBASE_AUTH_DOMAIN,
databaseURL: process.env.FIREBASE_DATABASE_URL,
projectId: process.env.FIREBASE_PROJECT_ID,
storageBucket: process.env.FIREBASE_STORAGE_BUCKET,
messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID,
appId: process.env.FIREBASE_APP_ID,
measurementId: process.env.FIREBASE_MEASUREMENT_ID,
},
services: {
hosting: true,
firestore: true,
storage: true,
functions: true,
},
}
const functions = require('firebase-functions')
const { Nuxt } = require('nuxt-start')
const nuxtConfig = require('./nuxt.config.js')
const config = {
...nuxtConfig,
dev: false,
debug: false,
buildDir: 'nuxt',
}
const nuxt = new Nuxt(config)
exports.ssrnuxt = functions.https.onRequest(async (req, res) => {
await nuxt.ready()
nuxt.render(req, res)
})