Open gerwinbrunner opened 9 years ago
Probably due to the fact that Accounts calls the login
method before remote-ddp
updates its connection. I will have a look into it when I have time.
That would be really awesome. Is there some way I can help you with this?
gwendall wrote:
Probably due to the fact that Accounts calls the |login| method before |remote-ddp| updates its connection. I will have a look into it when I have time.
— Reply to this email directly or view it on GitHub https://github.com/gwendall/meteor-remote-ddp/issues/1#issuecomment-89632187.
@gwendall where would you recommend to put the RemoteDDP call? Which file?
By looking at the DDP messages, I can confirm that the resume
request is sent to the natural DDP connection (DDP_DEFAULT_CONNECTION_URL) instead of the that specified in RemoteDDP
.
The resume request looks like this:
{"msg":"method","method":"login","params":[{"resume":"fkc1ZFUYqmfvN4kkAzm0RJQwkPvgRsIUaFSbYXG8wYu"}],"id":"1"}
Do we have any workaround on this ?
I managed to get it working well enough for myself (and I forgot to come back here). My approach is to use a private feature of the Accounts package to tell it to connect to the desired URL, then use the connection that it creates for everything else. As you might guess, it's quite brittle and the API is different. It's available at BudgieInWA/meteor-remote-ddp
Thanks man!! it worked!
Hi, how can I make it avaiable everywhere? I need to install this on a lot of projects, do you putting it on atmosphere? @BudgieInWA
As my version is so different from this one, I have published it at https://atmospherejs.com/budgie/remote-ddp. Further discussion about it should take place at my fork. Let me know how it goes.
Hi,
I created a simple meteor application that uses the remote-ddp package to connect to a meteor server (System A) with a full app.
I want to use the users of the remote users of the system A in this new app.
I added following code in a file the client/lib folder of the new app the following code: (points to server A)
I'm now able to log into the new app with an existing user. Hurray! But then I reload the page, I get the following message in the browsers console:
When I took a closer look at the ddp messages, I saw that the login message was sent to the new server instead of server A after the reload.
Do you have a clue what might cause this behaviour and how to fix it?
Cheers, Gerwin