[Mobile]: Facebook login not working


#1

When trying to login from the mobile app I get the following error on the server:

Error in OAuth Server: Failed to complete OAuth handshake with Facebook. failed [400] {"error":{"message":"Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request","type":"OAuthException","code":100}}

I am quiet confused, as the same login flow works without a problem on the server.

With the simulator on localhost it works, but not with an actual device and the remote server.

Any help would be appreciated, as I don’t even know where the problem might come from.


#2

What solved the problem was passing the ROOT_URL flag to the server when starting it. It apparently didn’t pick up these settings correctly from my settings.json file.


#3

Can you please share how is your App running in production? And how are you passing the ROOT_URL?


#4

Hey, check this out for production: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-meteor-js-application-on-ubuntu-14-04-with-nginx