Set up a JWT Authentication provider
Last updated on
10 November 2022
Updating your Salesforce integration to use JWT OAuth in 4.0 will provide numerous advantages:
- Server-to-server auth: use your keypair to provision a new access token any time, without any browser interactivity.
- Configuration management: no more problems with sandbox versus live configurations, or multi-sandbox configurations.
- Multiple endpoints: pluggable authentication unlocks potential for multiple salesforce connections from the same Drupal site.
This guide walks through connecting your Drupal site to Salesforce by adding a new JWT OAuth authentication provider.
- Create a new Key
- Use key module to create a new authentication key. Upload the key you created while setting up your JWT OAuth app in Salesforce.
- Add a Salesforce JWT Provider
- Navigate to Admin > Configuration > Salesforce > Salesforce Authorization (admin/config/salesforce/authorize)
- Click "Add Salesforce Auth Provider"
- Choose auth provider "Salesforce JWT OAuth"
- Paste your consumer key
- Enter the username for the user authorized to perform API requests
- Enter the login URL (https://login.salesforce.com for developer sandboxes and production orgs, https://test.salesforce.com for sandboxes)
- Choose the key created in step 1
- Save
- Go back to admin/config/salesforce/authorize, and assign your new JWT OAuth provider as the default.
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion