Salesforce OAuth2 - error=redirect_uri_mismatch en n8n self-hosted (GCP)

Context

I am trying to connect Salesforce with n8n self-hosted (running on GCP) using OAuth2 credentials, but I always get the following error:

error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration


Environment

markdown
Copiar código

yaml
Copiar código

  • Salesforce environment: Production (not sandbox)
  • n8n credential config: Environment Type = Production

What has been configured already

  • My IT team has added exactly the above Redirect URL in Salesforce → Connected App → OAuth Settings (screenshot attached).
  • The following OAuth Scopes are configured:
  • Full access (full)
  • Perform requests at any time (refresh_token, offline_access)
  • Consumer Key and Consumer Secret are correctly entered in n8n.

The problem

Despite all of this, the login still fails with the same redirect_uri_mismatch error.


Questions

  1. Is there any additional configuration required on the Salesforce Connected App, such as disabling these options?
  • Require Proof Key for Code Exchange (PKCE)
  • Require Secret for Web Server Flow
  • Require Secret for Refresh Token Flow
  1. Is it expected that n8n generates the redirect URL as:
    /rest/oauth2-credential/callback

yaml
Copiar código
instead of the /OauthRedirect path I see in some n8n documentation examples?

  1. Has anyone successfully connected Salesforce OAuth2 with n8n self-hosted on GCP and can confirm the correct Connected App setup?

Next steps

Any guidance on how to resolve this mismatch would be highly appreciated. I am attaching screenshots of the Connected App configuration and the exact error message.

Thanks in advance! :folded_hands:

Google credentials callback might the issue here :thinking: