You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.
I freshly cloned this repo (Friday, Nov. 9, 2018) and added the following code to componentDidMount in the App.js file
async componentDidMount() {
// TODO: You: Do firebase things
// const { user } = await firebase.auth().signInAnonymously();
// console.warn('User -> ', user.toJSON());
// await firebase.analytics().logEvent('foo', { bar: '123'});
---> firebase.auth().onAuthStateChanged((user) => {
console.log({ user });
});
}
There is a vital issue where the callback for onAuthStateChanged gets called every other time. On the first refresh, the callback gets invoked which logs the user. On the following refresh, the callback does not get invoked and the log does not get call. This cycles repeats for all subsequent refreshes
The text was updated successfully, but these errors were encountered:
He used Command + R to refresh iOS simulator. On first refresh, onAuthStateChanged is triggered and there is a log from console.log({ user }); but if he refresh it again, this time onAuthStateChanged is not triggered and we can't see any log from console.log({ user });
I freshly cloned this repo (Friday, Nov. 9, 2018) and added the following code to
componentDidMount
in theApp.js
fileThere is a vital issue where the callback for
onAuthStateChanged
gets called every other time. On the first refresh, the callback gets invoked which logs the user. On the following refresh, the callback does not get invoked and the log does not get call. This cycles repeats for all subsequent refreshesThe text was updated successfully, but these errors were encountered: