Accounts remote server

I have been trying to setup two meteor apps to use one collection from one app.

On the second app from the server I found if I set __meteor_runtime_config__.ACCOUNTS_CONNECTION_URL = process.env.ACCOUNTS_CONNECTION_URL; This will tell the client to use the remote accounts collection, but this doesn’t affect the server.

Has anyone gotten the Accounts package from one server to use the collection on the remote server? I have tried a slew of things I’ve found, but can’t seem to get it to work.

Things I’ve tried on the second server.

var remoteAccounts = DDP.connect(process.env.ACCOUNTS_CONNECTION_URL);
Accounts.connection = remoteAccounts;
Accounts.users = new Meteor.Collection('users', {
  connection: remoteAccounts
});

Whenever I call Accounts it sill looks locally on the second app. According to https://github.com/meteor/meteor/blob/master/packages/accounts-base/accounts_common.js#L207 it seems its in the works somehow…

Did you find a solution for this? I have the same problem too in regard to get logged user from a remote server