More issues with Meteor.userId() being ready before Meteor.user()

I’m trying to use alanning:roles in my routes.jsx file with FlowRouter. It’s not working out so well, because the Roles.userIsInRole function can’t access the user collection at that point in time. Does user permission/auth checking belong in a React component instead of the router?

Yes, I handle auth checking in my template component as per Kadira’s recommendations.

https://kadira.io/academy/meteor-routing-guide/content/implementing-auth-logic-and-permissions

1 Like

D’oh! Thanks for that, very helpful.