Firebase/auth currently in version 9 stores by default the session locally inside indexedDB.
Is there a method to access the local current user directly without accessing manually to the indexedDB? something like auth.currentuser?
onAuthStateChanged takes time to get the auth ready when it should be possible to retrieve the "saved current user session".
auth.onAuthStateChanged(function (userData) {
if (userData) {
// User is signed in.
} else {
// No user is signed in.
}
});

Aucun commentaire:
Enregistrer un commentaire