meteorhacks / cluster

Clustering solution for Meteor with load balancing and service discovery
https://meteorhacks.com/cluster-a-different-kind-of-load-balancer-for-meteor.html
MIT License
632 stars 80 forks source link

What IP addresses make requests to 3rd party Oauth? #41

Open adamgins opened 9 years ago

adamgins commented 9 years ago

Hi, I am using Cluster on AWS Opsworks... thanks to the great help of folks Sunsama.com as per https://blog.sunsama.com/meteor-docker-opsworks/

One thing I am not sure on is if I am using 3rd party Oauth (via accounts-facebook etc) the require that I put in the requesting domain and server IP (whitelist).

I have setup cluster to handle requests at mydomain.com ... I have not used the load balancer option. I have two servers

I have setup Facebook app to allow login from mydomain.com. If Cluster redirects me to the actual machine of my domain I can login. But when Cluster sends me to one of the other machines in the Cluster I get the following error:

Exception while invoking method 'login' Error: Failed to complete OAuth handshake with Facebook. failed [400] {"error":{"message":"This IP can't make requests for that application.","type":"OAuthException","code":5}} 

So this makes sense as the second machine in the cluster would have an IP that Facebook does not know.

As the system may autoscale, the IPs may not be known to Facebook.

I there some way to have Cluster have all requests seem like they're from one IP?