When you deploy the Salesforce component separately into a dedicated tenant or into your developer team it can not use the OAuth App specifically created for our main elastic.io tenant. For this purposes you must create a different OAuth App and add the required environment variables to the component setup.
Salesforce documentation page gives all specific details and explanation on how to create any app. We will go through the necessary steps to show where to locate those setup options.
To start you need to navigate to the Setup section. Please log-in to your account and select the Setup menu.
Next on the left-side menu use the Quick Find and search for
click to navigate to the page, and press on
New Connected App to start.
It will open a new page which should look like this:
Fill-in the required details for Connected App Name, API Name and Contact Email and also select the check-box called Enable OAuth Settings at API (Enable OAuth Settings) section. After enabling this check-box it will extend into the following setup:
refresh_token. For that purposes you need to explicitly request the
refresh_tokenscope to get one.
refresh_tokento be returned if you are eligible to receive one. This lets the app interact with the user’s data while the user is offline. The
refresh_tokenscope is synonymous with offline_access.
Press save to create your OAuth App.
After creating the OAuth App Salesforce would show you a screen containing all the necessary details of your newly created OAuth App.
From this setup you would need to copy the Consumer Key and the Consumer Secret for use in your custom installation of Salesforce component.
These two keys would need to be defined as Environment Variables for your custom deployed component.
You can create a Auth client directly in the credentials section:
You would need to define four variables here:
https://login.salesforce.com/services/oauth2/authorize, for sandbox -
https://login.salesforce.com/services/oauth2/token, for sandbox -
Here you can see how to select an existing
For more information pleas read our Secrets feature article.