[Vuejs]-How to use firebase auth in Vue

0👍

You can init vue app just after onAuthStateChanged first call.

    // main.js
    const unsubscribe = firebaseAuth.onAuthStateChanged(user => {
            new Vue({
                el: '#app',
                router,
                store,
                render: h => h(App)
            })
            unsubscribe() // unsubscribe to call init function only once
        }
    })

Leave a comment