Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Salesforce Node): Add support for PKCE #14082

Merged

Conversation

Joffcom
Copy link
Member

@Joffcom Joffcom commented Mar 20, 2025

Summary

Enables PKCE support for Salesforce, Turns out if you don't have PKCE enabled in Salesforce it will still allow it to be used so the option they have is to enforce it.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/NODE-873/salesforce-add-pkce-support-to-the-credential
https://community.n8n.io/t/salesforce-credentials-bug-with-code-challenge/31845

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team node/improvement New feature or request labels Mar 20, 2025
@Joffcom Joffcom changed the title feat(Salesfoce Node): Add support for PKCE feat(Salesforce Node): Add support for PKCE Mar 20, 2025
Copy link

codecov bot commented Mar 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Comment on lines +14 to +17
displayName: 'Grant Type',
name: 'grantType',
type: 'hidden',
default: 'pkce',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Joffcom wouldn't changing default break existing credentials? they had to be reconnected, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michael-radency I didn't have to reconnect my existing credential but you are right, it is possible that on refresh it errors out though. Let me see if I can think of a way to test that. Originally I was thinking about using a toggle option for PKCE but for some reason the grant type didn't like working with an expression.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michael-radency I connected my local env using non PKCE then used this branch and it has been running all weekend with no issues so I don't think this will break anything.

Copy link
Contributor

@michael-radency michael-radency left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link

cypress bot commented Mar 24, 2025

n8n    Run #9910

Run Properties:  status check passed Passed #9910  •  git commit fed11c97e3: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 Joffcom 🗃️ e2e/*
Project n8n
Branch Review node-873-salesforce-add-pkce-support-to-the-credential
Run status status check passed Passed #9910
Run duration 04m 53s
Commit git commit fed11c97e3: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 Joffcom 🗃️ e2e/*
Committer Jonathan Bennetts
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 5
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 472
View all changes introduced in this branch ↗︎

@CharlieKolb
Copy link
Contributor

CharlieKolb commented Mar 24, 2025

Can you merge latest master and rerun e2e? Curious if that fixes the 49-folders issue

Edit: It probably won't! Feel free to ignore the failed tests in 49-folders

Copy link
Contributor

✅ All Cypress E2E specs passed

@Joffcom Joffcom merged commit defeb2e into master Mar 24, 2025
36 checks passed
@Joffcom Joffcom deleted the node-873-salesforce-add-pkce-support-to-the-credential branch March 24, 2025 12:31
This was referenced Mar 24, 2025
@janober
Copy link
Member

janober commented Mar 24, 2025

Got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team node/improvement New feature or request Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants