"Login with Google/Facebook" breaks after deployment to DigitalOcean


#1

Hi

I have a problem with a new app where when i deploy it to a DigitalOcean server and use it thorugh a domain rather than localhost it breaks the login.

I have the “Authorized JavaScript origins” and “Authorized redirect URIs” set to my domain name of the site whereas i had it as localhost when it was working fine.

The problem seems to be that the actaul button is redirecting from the IP address of the site rather than the URL.

i.e the error im getting on Google is

Invalid parameter value for redirect_uri: Raw IP addresses not allowed: http://111.11.112.196/_oauth/google even though i go to the site through www.domain.com


#2

Did you set a ROOT_URL for the site?


#3

If i run the command ROOT_“URL=http://domain.com” will it set it permanently?

Im not too familiar with the process of changing the Root URL for deployment.

Im using mup deploy.


#4

ROOT_URL is just an environment variable, which I believe you can just define in your mup settings. It is exported everytime your app is (re-)started.


#5

Im fairly certain i have it set properly to the domain name rather than ip in the settings.json file.

Also i assume that it set as all the links on the site link to domain name rather than ip.

Im using a package to create a Google and Facebook login page automatically so im fairly sure i need to set something up with that.


#6

Ah sorted.

i had 2 mup.son settings files for some reason. One in root and one in a deploy folder.

I was using the one in the folder which was wrong.

Just had to set the BaseURL in the root MUP settings file.