How can I utilize `this.userId` from a Meteor Method call? -


currently have 2 apps, 'alpha' , 'bravo', split-up reduce code size. need 'bravo' app call meteor method written in 'alpha' app (from client) , needs utilize this.userid security. however, this.userid null if called 'bravo' app.

the 'bravo' app creates users duplicating createuser code , sharing same database. user can log each app no issues. connects alpha using: alphaddp = ddp.connect(alpha_server_url)

however when in bravo app if call alphaddp.call('updatedoc', docid, newdata)
this.userid value prints out null in alpha logs. assumed when connect ddp.connect authenticate connection. doesn't seem case.

after googling came across meteor.call("login") appears won't work if user isn't using email/password log in.

i tried experimenting new accountsclient couldn't make headway.

also caveat need work accounts sms login , accounts need created on 'bravo' app.

any ideas on how this?

given want 2 apps share code , same db, should @ package based architecture. allow split code packages, , selectivly import relevent code each app.

meteorpatterns.com has guide on approach.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -