• 1
name Punditsdkoslkdosdkoskdo

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

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

let provider = new firebase.auth.GoogleAuthProvider();

This works fine and the user is able to login with his Google credentials. When the user visits the page again, the popup opens again but since he has already logged in, the popup closes without requiring any interaction from the user. Is there any way to check if there is already a logged in user before prompting the popup?

Related Questions

Trending Tags