Struggling with Meteor’s Session ID

I need to provide user (session) specific data to unauthorised users. I had a somewhat clear idea how to to it, namely by utilising Meteor’s collections mechanism and use the anonymous user’s session id as a key. But there is no obvious way to access the session id.

I googled like a maniac. Fought some time with different approaches. Wrecked my brain. Found out that the session id is available on the server, in Meteor.publish methods. Finally I came up with this mind-bending solution:


But it’s absolutely worthless. I knew this right from the beginning, but I was unable to find out the right way. The Gods of Google had left me this morning. I knew it was supposed to be stored somewhere in the client.

Right in the moment I finished and integrated the above solution, I came across the session IDs hidden place:


Update: Since Meteor 0.6.5 it is:



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.