Summary of the Problem
I am running a self-hosted n8n instance (Docker + reverse proxy) and using OAuth2 integrations for both Google Sheets and Charles Schwab.
The issue is that n8n locks the OAuth Redirect URL inside credentials once it is generated, making it impossible to update when the base URL changes (for example, switching between localhost, a custom local domain, or HTTPS).
This causes serious problems when working with OAuth providers that have strict redirect URL validation, especially Schwab.
Why this is a problem
1. Different OAuth providers have different requirements
| Provider | Behavior |
|---|---|
| Allows HTTP, localhost, and multiple redirect URIs | |
| Schwab | Requires HTTPS and exact string match on redirect URI |
To support both providers locally, I need to switch between:
-
http://localhost:5678/...(Google) -
https://localhost/...orhttps://n8n.localhost/...(Schwab)
However, once a credential is created, n8n hard-codes the redirect URL based on environment variables at creation time and does not allow editing it later.
2. Changing the redirect URL requires recreating credentials
Because the redirect URL is locked:
-
Any base URL change forces credential deletion
-
OAuth providers (especially Schwab) often require manual approval (up to several business days) for redirect changes
-
This makes local development extremely slow and fragile
3. This breaks valid workflows
Real-world consequences:
-
OAuth providers reject callbacks due to mismatched redirect URLs
-
Credentials appear “Unauthorized” even though the OAuth app is valid
-
Secure cookies fail if HTTPS cert trust changes
None of these issues are user misconfiguration — they stem from the redirect URL being immutable inside n8n.
What I’m requesting from n8n
Allow OAuth Redirect URLs to be editable
Specifically, one of the following solutions:
Option A (Best)
Allow the OAuth Redirect URL field to be manually editable in credentials.
Option B
Allow multiple redirect URLs to be defined per credential.
Option C (Minimum)
Allow the redirect URL to be regenerated when:
-
N8N_EDITOR_BASE_URL -
N8N_HOST -
N8N_PROTOCOL
change — without requiring credential deletion.
Why this matters
-
Self-hosted n8n is a core offering
-
OAuth providers increasingly enforce HTTPS + strict validation
-
Local development requires flexibility
-
Locking redirect URLs makes legitimate setups fail unpredictably
This is not specific to Google or Schwab — it affects any OAuth2 provider with strict redirect rules.
Current workaround (not ideal)
The only workaround today is:
-
Running multiple local domains
-
Using reverse proxies
-
Re-registering OAuth apps repeatedly
-
Waiting days for provider approvals
This is fragile and unnecessary if redirect URLs were editable.
Environment (for reference)
-
n8n: self-hosted (Docker)
-
Reverse proxy: Caddy
-
Providers affected: Google Sheets OAuth2, Charles Schwab OAuth2
-
OS: Windows
-
Browser: Chrome
Closing
This is not a configuration error but a product limitation that significantly impacts OAuth workflows in self-hosted environments.
I’d appreciate guidance on whether:
-
This is expected behavior
-
There’s a roadmap item to make redirect URLs editable
-
A supported workaround exists
Thank you.