Hi @edgars, thanks for reaching out and joining the n8n community!
In our Salesforce credential documentation we outline the settings that should be disabled / enabled based on the authentication method that you’re using.
Using Oauth2 we outline the following:
Use these settings for your app:
Add the Perform requests on your behalf at any time (refresh_token, offline_access) scope in the Selected OAuth Scopes section, along with any other scopes you plan to use.
Make sure the following settings are unchecked:
Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows
Require Secret for Web Server Flow
Require Secret for Refresh Token Flow
In the API (Enable OAuth Settings) section, select Click to reveal to reveal the consumer secret.
Copy the Consumer Key and Consumer Secret and add these to the appropriate fields in n8n.
Just for the record, I am sharing the print screen from my Config, I just recommend you guys to do the same with some config that actually works, just in case I added the whole scopes:
Hi @edgars Looks like you still have the PKCE checked, Require Secret for Web Server Flow & Require Secret for Refresh Token Flow which is likely the reason you are getting the error message you are.
@Ludwig Has listed out the details that need to be unchecked for the authentication to work, keeping any of those checked can result in an error. It’s stumped me a few times in the past.