Currently I have two apps, 'Alpha' and 'Bravo', split-up to reduce code size. However now I need 'Bravo' app to call a Meteor method written in the 'Alpha' app (from the client) and it needs to utilize the this.userId for security. However, currently this.userId is null if called from 'Bravo' app.
The 'Bravo' app creates users by duplicating createUser code and sharing the same database. The user can log into each app with no issues. It also connects to Alpha using:
AlphaDDP = DDP.connect(alpha_server_url)
However when in Bravo app if I call AlphaDDP.call('updateDoc', docId, newData)
the this.userId value prints out null in the Alpha logs. I assumed that when I connect with DDP.connect it would authenticate the connection. However this doesn't seem to be the case.
After googling I came across Meteor.call("login") but it appears this won't work if the user isn't using email/password to log in.
I tried experimenting with the new AccountsClient but couldn't make any headway.
Also another caveat is that I need it to work with the accounts SMS login and the accounts need to be created on the 'Bravo' app.
Any ideas on how to do this?