Knowing When There is *NOT* a Logged-In User?

You need to use Meteor.loggingIn(). I use it like this on my react layouts

  const user = Meteor.user();
  const isLoggingIn = Meteor.loggingIn();

  if (!isLoggingIn && !user) {
    FlowRouter.go('login');
  } else if (!isLoggingIn && user) {
    // User is logged in
  }
4 Likes