just to know, what is the value of userState when the you are offline?
Promises only resolve once, but your auth state can change multiple times.
u should resolve or reject promise inside callback
Oh yeah, that's a good first step lol
But he is....?
i didn't use firebase https://firebase.google.com/docs/reference/js/v8/firebase.auth.Auth#onauthstatechanged mb smth like const onAuthStateChangedPromise = new Promise((resolve, reject) => auth.onAuthStateChanged(resolve, reject));
Обсуждают сегодня