Changing hostname or server name in Meteor for accounts - ui / accounts-google

I am building my first Meteor app and when setting up accounts-ui / accounts-google it prompts me Set Authorized Redirect URI to: http://localhost:3000/_oauth/google?close

- but this is not my server url and if I installed it get redirects from google login.

However, I can't seem to figure out how the meteorite (or accounting-ui) is being told the correct server hostname, so the ui accounts popup keeps telling to use localhost as the server name.

+3


source to share


1 answer


You need to set an 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 done automatically for applications deployed with meteor deployments, but must be provided when using the meteor bundle.



on posix system (linux, osx) you can simply start the meteorite like this:

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

      

+4


source







All Articles