sandstorm-io/meteor-accounts-sandstorm

Using package doesn't create the user instance expected.

simonv3 opened this issue · 2 comments

I'm using this package alongside https://github.com/jacksingleton/accounts-sandstorm-dev/ for local development and while the variables passed from Meteor.user() are what was expected in the Meteor dev environment:

$ Meteor.user()
{ _id: "5K4kv3TntZe4Ea8Fk", profile: Object, has_submitted: true, services: {sandstorm: Object} }

When I do the same inside the vagrant-spk dev environment I get:

$ Meteor.user()
Object { _id: "5k5i9FdPo7tNHTYwt", hasCompletedSignup: true, isAdmin: true, signupKey: "devAccounts", loginIdentities: Array[1], nonloginIdentities: Array[0] }

Which isn't what I thought the package should return.

The packaging instructions I'm following are here: https://docs.sandstorm.io/en/latest/vagrant-spk/packaging-tutorial-meteor/
While I'm now wondering whether what I should be using is: https://github.com/sandstorm-io/meteor-spk and whether that makes a difference in set up?

The code for this is: https://github.com/simonv3/quick-survey/

Asheesh pointed out that I should switch frame in the console. That prints out the right user, but the sandstorm service is still not available to the app - it might be an issue of being called too early and the user hasn't been established yet?

Don't mind me. Code was called too early.