nuxt-community / firebase-module

🔥 Easily integrate Firebase into your Nuxt project. 🔥
https://firebase.nuxtjs.org
MIT License
640 stars 99 forks source link

Documentation unclear #615

Open unremarkablegarden opened 2 years ago

unremarkablegarden commented 2 years ago

In the documentation under:

auth Initializes Firebase Authentication and makes it available via $fire.auth and $fireModule.auth. Type: Boolean or Object Default: false nuxt.config.js

auth: {
  persistence: 'local', // default
  initialize: {
    onAuthStateChangedMutation: 'ON_AUTH_STATE_CHANGED_MUTATION',
    onAuthStateChangedAction: 'onAuthStateChangedAction',
    subscribeManually: false
  },
  ssr: false, // default
  emulatorPort: 9099,
  emulatorHost: 'http://localhost',
}

It's unclear that you set it like:

services: {
      auth: {
        persistence: 'local', // ...

I assumed it would be:

services: {
      auth: true
},
auth: { persistence: 'local', // ...

Maybe make it clearer in the example code?