I have LoginTemplate in which I set user session depends on the user’s id from Mongodb, after the session starts I redirect the user to MainTemplate. As I try to session.get the user’s session info on the new MainTemplate the server won’t even start, gives me code error (Unexpected token).
LoginLayout
FlowRouter.go('/main'); Session.setAuth("loggedIn", data); console.log(Session.keys);
MainLayout
Template.MainLayout.events({ var sas = Session.get(keys.data); console.log(sas); });
any ideas what seems to be the problem?