Hi all,
I put the onLogin code into lib/router.coffee like this
Accounts.onLogin(->
console.log Meteor.user()
);
When starting the server, i got the error
Exception in onLogin callback: Error: Meteor.userId can only be invoked in method calls. Use this.userId in publish functions.
However, the log message is still displayed on the console log of Chrome. So, what is the correct way to access the user after logging into my app ?