How do I detect if a user is already logged in Firebase?

前端 未结 9 564
后悔当初
后悔当初 2020-11-28 04:38

I\'m using the firebase node api in my javascript files for Google login.

firebase.initializeApp(config);
let provider = new firebase.auth.GoogleAuthProvide         


        
9条回答
  •  余生分开走
    2020-11-28 04:48

    use Firebase.getAuth(). It returns the current state of the Firebase client. Otherwise the return value is nullHere are the docs: https://www.firebase.com/docs/web/api/firebase/getauth.html

提交回复
热议问题