Trouble with Google OAuth on subdomain, not "top private domain"

Describe the problem/error/question

I’m using a Cloudflare tunnel to reach a locally-running docker-compose setup, and I’m having a trouble with OAuth redirect_uri “mismatches”.

When setting up the OAuth flow on GCP, Google insists on a “top private domain” (cerebruh.is) and seemingly won’t work with the n8n-supplied n8n.cerebruh.is as a valid redirect_uri.

(Using the n8n cloud version, the analogous redirect_uri is https://oauth.n8n.cloud/oauth2/callback)

As a result, it seems that unless I want to replace my homepage with n8n, I’m stuck with a local n8n that won’t do OAuth for Google products.

What to do?

What is the error message (if any)?

“Error 400: redirect_uri_mismatch”

Information on your n8n setup

  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker-compose
  • Operating system: MacOS

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @marclar,

Welcome to the community :tada:

The redirect uri doesn’t need to be a top level domain and can be a sub domain but the the redirect uri does need to be using https so I would set WEBHOOK_URL to https://n8n.cerebruh.is assuming you are using HTTPS and that should sort it out.

I’m having the same problem with the “top private domain”. Have you found a solution?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.