Skip to content Skip to sidebar Skip to footer

How Can You Persist A Logged-in User With Firebase?

Thanks a bunch for reading this newbie's question. So, there is a ReactJS app which is using firebase for its authentication. Everytime the page is refreshed, the user is gone fore

Solution 1:

The Firebase Auth SDK enables persistence by default. If you want that default behavior, don't call firebase.auth().setPersistence() at all. Just use onAuthStateChanged to know when the persisted user object is first available.


Post a Comment for "How Can You Persist A Logged-in User With Firebase?"