nicolaslopezj / meteor-apollo-accounts

Meteor accounts in GraphQL
MIT License
146 stars 37 forks source link

Server-side Rendering & Access to user's ID #81

Open joncursi opened 6 years ago

joncursi commented 6 years ago

Is it possible to communicate the ID of the user making the request to the Meteor server? I am using the server-render package to perform SSR on my app, and to make sure the proper tree is rendered on the server, I need access to the user's ID.

Right now it looks like the user's id information is stored in localStorage in the browser instead of a cookie. The new version of the server-render package supports the ability to grab access to the user's cookies via the getCookie() method:

https://github.com/meteor/meteor/tree/devel/packages/server-render#usage