meteor-react-native icon indicating copy to clipboard operation
meteor-react-native copied to clipboard

On resume User is temporarily null after loggingIn is set to false

Open ToyboxZach opened this issue 4 years ago • 1 comments
trafficstars

When reconnecting to the server the order of events is

Meteor.status().connected == true Meteor.loggingIn() == true Meteor.loggingIn() == false Meteor.user() gets set

When I would expect

Meteor.status().connected == true Meteor.loggingIn() == true Meteor.user() gets set Meteor.loggingIn() == false

This inconsistency makes it hard to get the loading states to look right since there is a time that the user is not there but it is not loggingIn and connected.

To work around I need to check if Meteor._userIdSaved is set to see if it's going to load it still, but it is not ideal looking at a private variable.

ToyboxZach avatar Mar 29 '21 19:03 ToyboxZach

Hey @ToyboxZach. Thanks for submitting this bug. I've looked at the login flow and confirmed that the issue exists. I will try and get a fix out soon.

TheRealNate avatar Apr 02 '21 01:04 TheRealNate

Closing this issue due to no activity. Feel free to reopen.

github-actions[bot] avatar Dec 02 '22 02:12 github-actions[bot]