Facebook authentication does not work for metrothus.io application (node.js)

I have a meteor application running on a node.js machine on nitrous.io and facebook authentication does not work. I created a new application on facebook, added the site as a platform, set the application domain for machinename.usw1.nitrousbox.com and the website URL of the site http://machinename.usw1.nitrousbox.com (the machine name is made up, but I have my own site ), and then I used the public and private key to set fb auth in the launch of the meteor application. All this is similar to the way I installed the applications before, but when I try to enter nitrous.io in this application using fb, I get this from facebook:

    Given URL is not allowed by the Application configuration.: One or more of
    the given URLs is not allowed by the App settings. It must match the
    Website URL or Canvas URL, or the domain must be a subdomain of one of the
    App domains.

I tried all the different settings. Any ideas?

+3
source share
1 answer

There are two ways to solve this problem.

Option 1:

Meteor looks for the environment variable ROOT_URL to determine the default application URL http://localhost:3000/. You can save the settings as is, but you will need to use the following credentials in your facebook application configuration:

site_url: http://localhost:3000/

Option 2 :

If you want to use the preview URL, you need to install site_urlfacebook application in its configuration:

site_url: http://machinename.usw1-2.nitrousbox.com

The next step is to launch Meteor with the following command:

$ ROOT_URL=http://machinename.usw1-2.nitrousbox.com meteor

Alternatively, you can follow the Meteorite documentation to change your root URL.

+2
source

All Articles