Google OAuth Error 400: redirect_uri_mismatch AGAIN but new

Hello! This question has been asked many times before, but since then some parameters and things are changed in Google Console so I would appreciate your help on this.

I have n8n in a docker container and managed by caprover. While I can perfectly connect to other apps in other containers I have had problems with Google OAuth.

My n8n intance runs at https://subdomain.subdomain.domain.com
My env. variables are
WEBHOOK_URL=https://subdomain.subdomain.domain.com
N8N_EDITOR_BASE_URL=https://subdomain.subdomain.domain.com

My n8n redirect URL:
https://subdomain.subdomain.domain.com/rest/oauth2-credential/callback

My workflow uses Gdrive to upload a file and send it to a vector database
(typical RAG)

I’m geting the error 400:redirect_uri_mismatch

Inside Google Console My Oauth consent screen has my domain authorized and does no allow any subdomains. They put a note near the domain field telling us that any subdomain or port will work with registering the upper level domain.

Since the new version of Google Oauth console does not allow you to add new URIs, I don’t know how to solve this.

I am not a developer but have a good sense in tinkering with this stuff.

Thanks!

Information on my n8n setup

  • 1.70.0
  • Postgres
  • Self hosted via docker / caprover
  • Ubuntu 22.04

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:

Solved.
I used an App instead of a Web App.
Thanks.

1 Like

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