OAuth flow breaking when using a remote DDP connection


#1

I am trying to connect an app to a remote server with DDP connect. Everything works fine, loginWithPassword included. However, the Meteor.loginWith[provider] methods fail, even though I updated the Accounts.connection to the new one. Anyone ever encountered this problem?


#2

Most of the loginWith methods depend on a particular domain name the service is being enabled for (Facebook, Google, …). If you DDP.connect from a URL that does not match the pattern, the redirect will not work correctly. That is what I have found out anyways.


#3

Makes sense. However, Cordova apps with the --mobile-server flag manage to handle the auth even though a remote server is used. Isn’t there a workaround to achieve the same thing out of Cordova?


#4

I think this enters the murky and magic territory of DDP.connect. There are several other threads on this forum and some issues filed on github


#5

@jamgold @gwendall

Any workaround on this?


#6

Did you try setting ROOT_URL in your env? If that doesn’t work… This problem is totally exacerbated by Cordova, though. Make sure you set your --server and/or --mobile-server flags when you build.