Describe the problem/error/question
I have followed the instructions to setup Google Drive account using OAuth, but the OAuth Redirect URL that n8n has is the localhost - not my domain. How do I fix that?
What is the error message (if any)?
Information on my n8n setup
n8n version: 1.94.1
Database (default: SQLite): default - docker image
n8n EXECUTIONS_PROCESS setting (default: own, main): default, only just started from docker image
Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
Operating system: Docker is running on Linux/Ubuntu
Can’t use localhost
in Google as redirect hostname.
If you are self-hosting.
Try Ngrok
or Cloudflare tunnel
(If you have your own domain).
The point is you need a domain that can be reached from outside.
localhost
is meaning my home
in internet. So that can’t be recognize whose home is in Google or other service.
Thanks, I am using Cloudflare for the DNS and reverse proxy the n8n subdomain. How do I tell n8n (in its Docker container) that?
You can change
{{domain}}/rest/oauth2-credential/callback
If you are accessing your n8n through https://test.n8n.com
Then it would be
https://test.n8n.com/rest/oauth2-credential/callback
Thanks, so I don’t need to change anything in n8n? I just need to correct the string of text when I copy it out?
Yes.
or you want the UI shows the correct webhook url by default
You can change the docker variable
WEBHOOK_URL
1 Like
Thanks, Yes I was able to get this working thanks to another post - OAuth Redirect URL
Thank you everyone for helping out.
1 Like
system
Closed
June 11, 2025, 1:19am
8
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.