I am using a self-hosted version of n8n. It’s a Docker container on a Synology device.
I added OAuth settings on the side of Google according to the instructions, but every time I try to click “Sign In with Google” in n8n, then as soon as I choose an account and click “Allow”, a “This site can’t be reached” error appear.
If not you may try to make new app in google console, maybe somewhere there is a problem or at the end try different token type (Service Account or OAuth depended on what you are using now)
So according to Mozilla docs error 400 is bad request, so google handled the request, but the request was wrong.
Also, error say: device_id and device_name are required for private IP what have make sense for me, since Google has to know that who are you and 127.0.0.1 will be Google itself for them (they will make request to 127.0.0.1 on they’s server, so it’s they’s localhost).
I have never been run n8n on private network, but I made some research and I cannot find how to set those parameters, but you can try to make the fake domain, be aware that this probably will require change, also webhook environment. Have a look at those topics to see how it can be done:
@Shirobachi second screenshot looks like it migt be portainer.
@FilipWozniak Google can sometimes be a bit funny when you want to use an internal IP for OAUTH, What I tend to do is edit the hosts file on my machine so I can use a domain and my machine will redirect to the correct place.
An alternative would be something like nip.io which is a bit of magic DNS tricky, You could set your webhook_tunnel_url to http://192.168.100.100.nip.io:5678 then update the redirct URI in Google and it should work.
Actually, it is a Docker, and more specifically it is a Docker application that you can install from “Package Center” on Synology. In one of the tabs, it allows for editing environment variables.
Also, error say: device_id and device_name are required for private IP what have make sense for me, since Google has to know that who are you and 127.0.0.1 will be Google itself for them (they will make request to 127.0.0.1 on they’s server, so it’s they’s localhost).
Well, actually, I’ve found that, too.
Google can sometimes be a bit funny when you want to use an internal IP for OAuth. What I tend to do is edit the hosts file on my machine so I can use a domain and my machine will redirect to the correct place.
It is not that easy on NAS. I mean, there are plenty of tutorials which demonstrates how to set up DDNS and access the Synology and all applications using address like http://wozniak.synology.me, not a local one (like this one - “How to Access a Synology NAS Remotely with DDNS”), but this requires changing the port forwarding settings and similar. Quite frankly, I don’t want to mess with that. I have a local server for a reason - to be in my local network, and not necessarily be exposed to the whole world.
An alternative would be something like nip.io which is a bit of magic DNS tricky, You could set your webhook_tunnel_url to http://192.168.100.100.nip.io:5678 then update the redirct URI in Google and it should work.
Hmm. I’ve seen a thread on Stack Overflow and someone mentioned something similar - xip.io. I’ll try it.