> For the complete documentation index, see [llms.txt](https://learn.capstorm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.capstorm.com/capstorm-container/setting-up-salesforce-for-authentication.md).

# Setting Up Salesforce for Authentication

In order to login to the CapStorm/Container using Salesforce, you will first need to set up a connected app in your Salesforce org. This connected org will need to have OAuth Settings enabled along with a handful of other settings. This article walks through each step required to create a Salesforce Connected App that can be used to enable Salesforce authentication in the CapStorm/Container. For more information on setting up Connected Apps in Salesforce, please visit [Salesforce’s official documentation.](https://help.salesforce.com/s/articleView?id=sf.connected_app_create.htm\&type=5)

Note: the screenshots and instructions in this page use sample values for a number of parameters.

* <http://localhost:8080> is the host/port used for the CapStorm/Container.
  * You will need to use the host and port values that are applicable to your environment.
  * Your values for the host, port, and protocol should be used for the **Callback URL** parameter and the **Start URL**parameter.
* The Connected App Name and contact details should be changed to reflect proper values for your organization.

## Steps to Setup the Connected App

1. Login to Salesforce and go to **Setup**
2. In the Quick-Find search bar, type **App Manager** and select it
3. In the top right, click **New Connected App**
4. Enter a name for the app in the **Connected App Name** field
   * The API name will auto-fill when you click enter
   * Note: This name can be anything you’d like
5. Add a **Contact Email**
   * ![](https://495509274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDAPx1zE2IARmzGMaHbAx%2Fuploads%2Fgit-blob-230fcb4478f2bd602a36586331b55a953ece17ab%2Fba9dc167-SettingUpSalesforceForAuthentication_AppName-300x138.png?alt=media)
6. In the **API (Enable OAuth Settings)** section, select **Enable OAuth Settings**
7. In the **Callback URL** box, enter \*\*<http://localhost:8080/j_security_check**>
8. For the **Selected OAuth Scopes,** add the below scopes
   * **Access the identity URL service (id,profile,email,address,phone)**
   * **Access unique user identifiers (openid)**
   * ![](https://495509274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDAPx1zE2IARmzGMaHbAx%2Fuploads%2Fgit-blob-b7485e9a6cd177af2277dfdb0d7e865df5f1fff2%2F3ad32fdd-SettingUpSalesforceForAuthentication_OAuthSettings-1024x319.png?alt=media)
9. Disable the below settings
   * **Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows**
   * **Require Secret for Web Server Flow**
   * **Require Secret for Refresh Token Flow**
10. Enable the below settings
    * **Enable Authorization Code and Credentials Flow**
    * **Enable Token Exchange Flow**
    * ![](https://495509274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDAPx1zE2IARmzGMaHbAx%2Fuploads%2Fgit-blob-7564a966d94e40b44976b66e543a415da585e14f%2F93fae3a9-SettingUpSalesforceForAuthentication_FlowSettings.png?alt=media)
11. Enable **Configure ID Token**
12. Set **Token Valid for** to **10 Minutes**
13. Select **Include Standard Claims** and **Include Custom Attributes**
    * ![](https://495509274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDAPx1zE2IARmzGMaHbAx%2Fuploads%2Fgit-blob-d10187c1e51000c6ee2766786be94a0d486fae90%2F7c0c97cb-SettingUpSalesforceForAuthentication_ConfigureID-300x79.png?alt=media)
14. Under Web App Settings, enter <http://localhost:8080> next to **Start URL**
    * ![](https://495509274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDAPx1zE2IARmzGMaHbAx%2Fuploads%2Fgit-blob-b3b34b3baa32f7b16038242b80f5fb2613afc7f2%2F715230e0-SettingUpSalesforceForAuthentication_WebAppSettings-300x36.png?alt=media)
15. Click **Save**
16. In the API (Enable OAuth Settings) section, click the **Manage Consumer Details** button
    * ![](https://495509274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDAPx1zE2IARmzGMaHbAx%2Fuploads%2Fgit-blob-3f9dc583a1d508621932c9c03c501f74e9300f39%2F2c704aad-SettingUpSalesforceForAuthentication_ManageDetails.png?alt=media)
17. Note the **Consumer Key** and the **Consumer Secret**; You will need these for setup in the application.
    * Consumer Key = OIDC\_CLIENT\_ID
    * Consumer Secret = OIDC\_CLIENT\_SECRET
