Connect your app to Salesforce

Connect your app to Salesforce

To configure a Salesforce OAuth2 connection you will need to register your Auth0 tenant on their Administer panel.

1. Register a New App

Log into Salesforce. Click on Settings > Setup in the upper right, next to your account name.

Navigate to Platform Tools > Apps. Under App Manager, click New Connected App:

2. Complete the New Connected App form

  1. Enter the required basic information (Connected App Name, API Name and Contact Email).
  2. Select Enable OAuth Settings under API (Enable OAuth Settings).
  3. Enter your callback URL: https://YOUR_DOMAIN/login/callback

Find your Auth0 domain name for redirects

If your Auth0 domain name is not shown above and you are not using our custom domains feature, your domain name is your tenant name, plus For example, if your tenant name were exampleco-enterprises, your Auth0 domain name would be and your redirect URI would be

If you are using custom domains, your redirect URI will have the following format: https://<YOUR CUSTOM DOMAIN>/login/callback.

  1. Add Access your basic information to the Selected OAuth Scopes.
  2. Click Save.

3. Get your Consumer Key and Consumer Secret

Once your app is registered, the page will display your Consumer Key and Consumer Secret:

4. Copy your Consumer Key and Consumer Secret

Go to your Auth0 Dashboard and select Connections > Social, then choose Salesforce.

Copy the Consumer Key and Consumer Secret from the Connected App page of your app on Salesforce into the fields on this page on Auth0 and click Save:

Salesforce Community Authentication

Authenticating users in a Salesforce community uses different endpoints that the regular Salesforce app.

The authorization URL for a Community site will be: https://{name of your community}{community path}/oauth2/authorize.

In this example, the community is named contoso and it is for customers:

Notice that Auth0 will automatically pass all required OAuth2 parameters (such as response_type, client_id, and so on) and concatenate other elements to the path (such as oauth2/authorize). All that is required is that you configure the base community site URL:

For full details refer to this Salesforce article.

It is common to customize the login page for Community sites. If you do so, remember that the login page is part of the login transaction and you must honor the OAuth2 flow. This sample provides details on how to do it properly.