Alex Rivera | Logout

Persistent Sessions in Meteor

Asked 2012-07-29T00:55:48.840
8

So, one of the more confusing aspects I've been observing with Meteor is that Sessions get cleared every refresh. Since it isn't a persistent store, where would I put things like userid, or where people are in my application's state machine?

What are the patterns for those scenarios?

Edit
Report

1 Answer

3

Well, for a start I would be using meteors built in Auth to store userID. They are using local storage by default there I think, but AFAIK there's no easy way to hook into that.

However, I would have thought if you want stuff to survive across refreshes you should either store it in mongo or use the URL to indicate where they are in the 'state machine'. You can use the bootstrap router (for example) to use pushState to change the URL.

answered 2012-07-29T07:29:58.743

Your Answer