Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor + accounts-facebook redirecting to wrong url

I'm currently developing on my server, not on my personal computer, but it seems to be impossible to tell it to Meteor, as I'm trying to use Facebook login. The expected login url for app.example.com is

https://www.facebook.com/dialog/oauth?client_id=<client id>&redirect_uri=http://app.example.com/_oauth/facebook?close&<more junk>

But I always get

https://www.facebook.com/dialog/oauth?client_id=<client id>&redirect_uri=http://localhost:3000/_oauth/facebook?close&<more junk>

I'm using Nginx as a proxy for Meteor server, so I should be able to access it pointing to app.example.com, but Meteor seems to not detect it. Where is it changeable?

like image 803
ranieri Avatar asked Oct 02 '22 23:10

ranieri


1 Answers

You should set the environment value ROOT_URL before executing meteor, i.e.

ROOT_URL=http://app.example.com meteor run
like image 153
waitingkuo Avatar answered Oct 05 '22 11:10

waitingkuo