Cannot use N8N Google Auth with Localhost
I am using RunTipi latest version with n8n latest version, basically i am trying to create an integration that uses google docs, so i setup the credentials, insert the Client ID and Client Secret, and localhost since the local IP is not supported by google;
Tried both going on production state and trying to login as showed in the second screen but every time i try it gives me the following error.
Tried using ngrok to see if the error is persistent, tried setting in the file a record and setting google with that following fake dns record but still no changes



11 Replies
@Nicolas I think there may be a problem on how runtipi parses the ip address maybe, i am sorry if i tag you but i didn't see anyone have a similar problem unfortunately and i think that this may be a serious bug if that is the case
Hello,
It looks like n8n is still using your IP address as OAuth Redirect URL, you need to make it aware of
n8n-data-fake.com
domain.
The easiest way would be to :
1. Configure it in runtipi, check the linked picture. (you can keep other options activated at your own convenience)
2. Restart n8n
3. Access n8n via https://n8n-data-fake.com
4. Check the callback URI is now matching the one registered one in your Google Cloud App
5. Login into your Google Account
Can you elaborate your hypothesis ?
but i can keep the original 8215 port since by default n8n uses the ~5000 ish something port and he subdomain n8n.tipi.local correct?

basically if this solution doesn't work out i suppose that something related to the configuration of IP parsing of RunTipi causes this error
and since n8n does not send a device_id and device_name field
it makes it impossible to use private ip's for google authentication
Now things changed actually, the errors changed to a URL mismatch




What is the callback URL indicated by n8n in the credential creation form ?
Shouldn't it be
https://n8n-data-api.com/rest/oauth2-credential/callback
?Does the callback endpoint even responds?
If you use n8n-data-api.com:8215 this won’t go through runtipi’s reverse proxy. It’s basically a direct call to your n8n container
i tried using a n8n-data-api.com route since if i used localhost nothing happened
so i tried a solution that i finded on stack overflow regarding docker hosted instances of n8n
right now it updated the callback URL
if i access from the direct ip of the server
192.168.0.21:8215
this is the output.
If i try to access from the n8n dashboard from n8n-data-api.com OR n8n-data-api.com:8215
prob i need to set that dns record on my dns server as well ( i suppose )
If i access from n8n.tipi.local
the callback is the same as the first case attached
yep that was the issue
To solve in case anyone needs it:
1. Add a fake dns record to your file called and assign it the ip to point towards the local machine, then on google developer console put the URL: