tufelkinder
tufelkinder

Reputation: 1256

Change host or server name in Meteor for accounts-ui / accounts-google

I'm building my first Meteor app, and when configuring accounts-ui / accounts-google I'm prompted to Set Authorized Redirect URI to: http://localhost:3000/_oauth/google?close -- but that is not the URL of my server and if I set that, it does not receive the redirect from the google login.

However, I cannot find out how tell meteor (or the accounts-ui) the correct hostname of the server, so the accounts-ui popup keeps saying to use localhost as the server name.

Upvotes: 3

Views: 397

Answers (1)

Christian Fritz
Christian Fritz

Reputation: 21364

You need to set the environment variable ROOT_URL. http://docs.meteor.com/#meteor_absoluteurl:

The server reads from the ROOT_URL environment variable to determine where it is running. This is taken care of automatically for apps deployed with meteor deploy, but must be provided when using meteor bundle.

on a posix system (linux, osx) you can just start meteor like this:

env ROOT_URL=http://myserver.com:myport meteor

Upvotes: 4

Related Questions