Error 400:Invalid Request. I’m hosting on coolify using docker, and through cloudflare and oracle. 0Auth2 worked fine with the earlier versions. However, google did an update requiring the https:// In front of the 0Auth Redirect so when I paste my URL it doesn’t work anymore. I tried hard coding the URL with an https:// in front and no dice, I also hardcoded it all into my coolify server, no dice. Anyone know how to resolve this? It’s urgent!!
This isn’t a Drive node problem and it’s not Coolify specifically either. Google is now blocking the OAuth flow because your app fails the “secure response handling” checks, not just because of https://.
That long error URL you pasted is the key.
What Google is actually rejecting
This part matters:
“doesn’t comply with Google’s OAuth 2.0 policy for keeping apps secure” secure-response-handling
This happens when Google thinks the OAuth redirect can be intercepted or downgraded, which is very common with:
Cloudflare in front
Docker behind a proxy
n8n not fully aware it’s HTTPS end-to-end
Even if the URL looks HTTPS to you.
Why it suddenly broke
Google tightened enforcement recently. Older setups that “sort of worked” are now blocked.
Before: warning
Now: hard fail (400 Invalid Request)
The real fix (this is the important part)
You already tried adding https:// — that’s not enough anymore.
You need all of these to be true at the same time:
Thank you for your thoughtful response. I implemented all of this, and no dice. Some of these things weren’t updated, so I think I’m getting closer. The deeper I look at it, I’m almost positive it has to do with the image I’ve pasted here. Where my 0Auth Redirect URL is “n8n-100.myquantumflow.ai/rest/oauth2-credntial/callback”. It does not start with the “https://” Then if I hard code it in the google oauth it still pulls from what I just gave here, as the error code reflects. Any other ideas of why this is happening and how to fix? I’ve been talking with chatgpt for hours and we cannot get it solved haha.
I had already tried these measure, but just for good measure I tried them again. None of this worked for me. Here’s my env variables:
ERVICE_FQDN_N8N=n8n-100.myquantumflow.ai
SERVICE_FQDN_N8N_5678=n8n-100.myquantumflow.ai:5678
SERVICE_URL_N8N=https://n8n-100.myquantumflow.ai
SERVICE_URL_N8N_5678=https://n8n-100.myquantumflow.ai:5678
GENERIC_TIMEZONE=America/Phoenix
N8N_EDITOR_BASE_URL=${SERVICE_URL_N8N}
N8N_HOST=${SERVICE_URL_N8N}
N8N_PROTOCOL=https
N8N_PUBLIC_API_URL=https://n8n-100.myquantumflow.ai
N8N_SECURE_COOKIE=true
N8N_TRUST_PROXY=true
N8N_URL=https://n8n-100.myquantumflow.ai
TZ=America/Phoenix
WEBHOOK_URL=${SERVICE_URL_N8N}
I run by using an SSH key with Oracle, Cloduflare, and then coolify. I’ve been struggling with this issue for a few weeks now, came out of no where with I believe either googles or N8N update. Should I just change to a different hosting provider like CapRover?