Set OAuth Redirect URL to N8N_EDITOR_BASE_URL

The idea is:

Currently the OAuth Redirect URL gets set to the WEBHOOK_URL value. It should probably default to, or be configurable to the N8N_EDITOR_BASE_URL.

My use case:

We have separate domains for webhooks and the management/editor interface. There is no circumstance when we’re creating OAuth credentials that we’d be accessing the editor via the WEBHOOK_URL. In fact that path doesn’t allow access to the editor interface at all.
Temporarily removing WEBHOOK_URL then defaults the OAuth callback URL to <HOST>:<PORT> which also doesn’t work when behind a reverse proxy.

I think it would be beneficial to add this because:

The only workaround to create OAuth credentials with this setup is to set WEBHOOK_URL to N8N_EDITOR_BASE_URL so the callback works, and then revert the change. However this interrupts processing and potentially drops some webhooks when triggers are recreated with the editor URL.

Are you willing to work on this?

Turns out it was a one line change, but it may be desired to have this behind some kind of conditional to keep the old behaviour :man_shrugging: