nuxt-community / firebase-module

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

Initialize Auth - does not work in lazy mode #538

Closed andyfensham closed 3 years ago

andyfensham commented 3 years ago

In the documentation at the path https://firebase.nuxtjs.org/service-options/auth under the initialize section, there is a statement saying "This does not work in lazy-mode , since auth is not initialized. If you want to use this option in lazy-mode, call the authReady() function in a separate plugin."

Can we get an example on how you would call that in a seperate plugin. I have lazy mode set to true.

Thanks

lupas commented 3 years ago

There you go: https://github.com/lupas/nuxt-firebase-demo/blob/9b7b0518c438875f52a8a9807cfe0939e80d628d/plugins/lazyMode.js