Error: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp()

后端 未结 9 676
慢半拍i
慢半拍i 2020-12-01 15:55

I have a firebase database linked up to two apps, one being an iOS app and another being a web app coded in node.js which is a basic algorithm that sets data to the database

9条回答
  •  庸人自扰
    2020-12-01 15:57

    YOU CALL THIS IN JADE: firebase.initializeApp(config); IN THE BEGIN OF THE FUNC

    script.
        function signInWithGoogle() {
            firebase.initializeApp(config);
            var googleAuthProvider = new firebase.auth.GoogleAuthProvider
            firebase.auth().signInWithPopup(googleAuthProvider)
            .then(function (data){
                console.log(data)
            })
            .catch(function(error){
                console.log(error)
            })
        }
    

提交回复
热议问题