Hello fellow meteorites,
I have the need to split my application in two parts. One app is on my domain’s / and the other is in a subfolder. The second app absolutely requires the user to be connected, and I would like to share the session across.
Before, this was easily done, but I see that there has been a PR a while ago that removed this possibility while fixing his use case. The meteor accounts now append the path of the application to tokens so two different app can share a domain’s localstorage without affecting eachother. That’s fine but its the opposite of what I’d like.
For now, I duplicate the keys on user login to the keys the second app expects… But I feel it is pretty hacky. I see that the AccountsClient object has
LOGIN_TOKEN_EXPIRES_KEY:"Meteor.loginTokenExpires"
LOGIN_TOKEN_KEY:"Meteor.loginToken"
USER_ID_KEY:"Meteor.userId"
When looking at the console… If I change those value to the correct ones, the user gets logged in perfectly but the keys are not retained which means I cannot expect it to always work, and it does only work when I access the root path… Seems like my FlowRouter settings are preventing it to work correctly…
Do any of you know of a good way to be able to configure this kind of option? Choosing our localstorage keys could be something usefull…