Describe the problem/error/question
Hi,
I am self-hosting n8n on a home server and exposing it publicly behind Cloudflare (proxied DNS). When I try to create a Google OAuth2 credential and click “Sign in with Google”, the request to:
GET https:///rest/oauth2-credential/auth?..very long query…
fails with:
414 URI Too Long
Server: cloudflare
So Cloudflare rejects the request before it reaches my n8n instance.
From the browser Network tab I can see that the query string contains:
homeProject=...– a large JSON blob with the current project infoscopes=[ ... ]– a long list of n8n RBAC scopes (credential:, workflow:, user:*, etc)- All Google OAuth settings (auth URL, token URL, clientId, scopes, etc)
This combined payload makes the URL extremely long. After I added more Google scopes (YouTube related), the request started to hit Cloudflare’s URL length limit and now consistently returns 414.
n8n editor serializes:
your project (homeProject)
your RBAC scopes (scopes=[…])
the OAuth config (URLs, clientId, clientSecret, Google scopes)
into one GET request to /rest/oauth2-credential/auth.
Axios / browser URL encoding
Expands characters (: / spaces etc → %3A, %2F, %20), which increases length.
Cloudflare
Enforces a maximum allowed request line (method + path + query).
When your particular combination crosses that threshold, it returns 414 URI Too Long.
No exotic extension, no weird Google behavior. Just:
Big query + encoding + strict CDN = 414.
Questions
- Is it expected that
/rest/oauth2-credential/authincludeshomeProjectand the full internalscopesarray in the query string instead of the request body? - Is there any configuration to:
- change this request to POST with a body, or
- avoid sending so much internal state in the URL?
- Has anyone else seen
414 URI Too Longon this endpoint when running n8n behind Cloudflare, and if so, how did you resolve it (bypass Cloudflare for this host/path, adjust n8n config, etc)?
Thanks!
What is the error message (if any)? 414
Please share your workflow
Just trying to login into google via credentials.
Share the output returned by the last node
https:///rest/oauth2-credential/auth
?id=
&homeProject={…large project JSON with role + scopes…}
&scopes=[
“annotationTag:create”,
“annotationTag:delete”,
“credential:create”,
“credential:delete”,
“credential:list”,
“workflow:create”,
“workflow:read”,
“workflow:update”,
“user:create”,
“user:list”,
“user:update”,
… many more internal n8n scopes …
]
&useDynamicClientRegistration=false
&grantType=authorizationCode
&authUrl=https%3A%2F%2Faccounts.google.com%2Fo%2Foauth2%2Fv2%2Fauth
&accessTokenUrl=https%3A%2F%2Foauth2.googleapism%2Ftoken
&clientId=
&clientSecret=
&scope=https%3A%2F%2Fwww.googleapism%2Fauth%2Fyoutube%20
https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutubepartner%20
https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube.force-ssl%20
https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube.upload%20
https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutubepartner-channel-audit
&authQueryParameters=access_type%3Doffline%26prompt%3Dconsent
&authentication=body
&sendAdditionalBodyProperties=false
&allowedHttpRequestDomains=all
&allowedDomains=
Information on your n8n setup
- n8n version: The newest
- Database (default: SQLite): Sqlite
- n8n EXECUTIONS_PROCESS setting (default: own, main): idk
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Umbrel OS