Is there a preference of checking Meteor.user()
vs Meteor.userId()
? I’m using Flow Router, in this case.
let userDashboard = FlowRouter.group({
prefix: '/user/dashboard',
name: 'userArea',
triggersEnter: [function (context, redirect) {
if (!Meteor.user()) {
FlowRouter.go('/user/login');
}
}]
});