UPDATE: When I deploy the app to meteor.com I do not get any of the same issues, so the problem is definitely related to the development environment and I suspect somehting to do with ROOT_URL and the way redirects are handled.
I am running Meteor on Nitrous.io.
I have installed the accounts-facebook package and have added the following to the server folder:
ServiceConfiguration.configurations.remove({
service: "facebook"
});
ServiceConfiguration.configurations.insert({
service: "facebook",
appId: '31058319242*****',
secret: '4f6c8a9b5aab235111e97*********',
site_url: 'http://accounts-*****.apse2.nitrousbox.com/'
});
I have also changed the root url of my application at startup:
Meteor.startup(function () {
Meteor.absoluteUrl.defaultOptions.rootUrl = "http://accounts-*****.apse2.nitrousbox.com/"
});
I have included the exact same url to my apps 'Basic' settings:
and 'Advanced' settings:
[obviously, the ***** is actually a string identifying my Nitrous 'box' - I have redacted it here]
However, when I try to authorise using facebook I get the following error:
Exception while invoking method 'login' Error: Failed to complete OAuth handshake with Facebook. failed [400]
{
"error":
{
"message":"Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
"type":"OAuthException",
"code":191
}
}
I have tried a number of different variations on these settings, but without success.
Has anyone else come across this issue? Help appreciated.