Salesforce Social Login Configuration Guide



Salesforce is a San Francisco-based cloud computing company. There are an estimated 4 million Salesforce subscribers.

Before You Begin

To use Salesforce for social login you must:

  1. Obtain a Salesforce developer’s account from https://login.salesforce.com.
  2. Do one of the following:
    • Open a previously-created Salesforce app, and copy the consumer key and consumer secret.
  3. Use the Social Login Dashboard configure Salesforce as a social login provider.

In This Configuration Guide


Creating a Salesforce App

Back to top


This section walks you through the process of creating an app that can be used to configure Salesforce social login. If you already have an app, see the Using an Existing Salesforce App for Social Login section of this documentation.

  1. Log on to the Salesforce Lightning Developers site at https://login.salesforce.com.
  2. From the Setup page, expand Apps and then click App Manager:

  1. On the Lightning Experience App Manager setup page, click New Connected App:

  1. On the New Connected App page, enter:
  • The name of your app in the Connected App Name field.
  • The "API name" of your app in the API Name field. By default, Salesforce will use your app name as the API name, replacing any blank spaces in the name with underscores (for example Identity_Cloud_Login). If you’d rather enter your own API name, just be sure that your name doesn't include blank spaces.
  • Your email address in the Contact Email field.

For example:

  1. Select Enable OAuth Settings.

  2. In the expanded OAuth settings section, in the Callback URL field, enter the Salesforce callback URL for your website. If you are using a standard Identity Cloud domain, your redirect URL will look similar to this: https://greg-stemp.rpxnow.com/salesforce/callback. For example:

  3. From the Available OAuth Scopes list, select the following scopes and then click the Add button to add those items to the Selected OAuth Scopes list:
  • Access and manage your data (api)
  • Access your basic information (id, profile, email address, phone)
  • Allow access to your unique identifier (openid)
  • Full access
  • Perform requests on your behalf at any time (refresh_token, offline_access)

For example:

  1. Scroll to the bottom of the page and then click Save.
  2. On the New Connected App page, click Continue:

  3. On the home page for your new app, click Copy to copy your app’s Consumer Key:


    You'll need both the consumer key and the consumer secret in order to configure Salesforce as a social login provider.
  1. Click Click to reveal next to your Consumer Secret and then click Copy to copy that secret:

  1. Log off from the Salesforce Developer center.



Using an Existing Salesforce App for Social Login

Back to top


If you already have a Salesforce app that can be used for social login, complete the following steps to retrieve the application’s consumer key and consumer secret:

  1. Log on to the Salesforce Lightning Developers site at https://login.salesforce.com.
  2. From the Setup page, expand Apps and then clickApp Manager:
  1. From the Lightning Experience App Manager page, click the Options button for your app and then click View:

  1. On the home page for your app, click Click to reveal:

  1. Copy the Consumer Secret:

    You'll need both the consumer secret and the consumer key in order to configure Salesforce as a social login provider.

  2. Click Copy to copy the consumer key:
  3. Log off from the Salesforce Developers site.



Configuring Salesforce as a Social Login Provider

Back to top


To configure Salesforce as a social login provider, make sure you have your Salesforce consumer key and consumer secret, and then complete the following procedure:

  1. Log on to your Social Login Dashboard (https://dashboard.janrain.com).
  2. From the Dashboard home page, click the Manage Engage Dashboard icon.
  3. From the Engage Dashboard home page, in the Widgets and SDKs section, click Sign-Ins.
  4. From the Sign-in page, verify that Widget is selected and then expand Providers.
  5. From the list of Providers, click Salesforce.
  6. In the Salesforce dialog box, click Next until you reach the screen requesting the consumer key and consumer secret:
  7. Paste your Salesforce consumer key in the Consumer Key field, paste your Salesforce consumer secret in the Consumer Secret field, and then click Save. Salesforce appears in your social login widget.
  8. When you are finished, select Save and Publish and then click Publish. It might take as long as one hour before Salesforce appears as a social login option on your web site.



Testing Salesforce Social Login

Back to top


To test Salesforce social login, complete the following procedure:

  1. Do one of the following:
    • If you have just published your widget settings, click the Test your widget link that appears after the widget has been saved.
    • If you previously published your widget settings then, from the Engage Dashboard Sign-in page, click Launch a test widget.
       
  2. From the Test page, click the Salesforce icon:
  3. In the Allow Access? | Salesforce window, click Allow, and then log on using a valid Salesforce account:
  4. If login succeeds, information returned from the Salesforce profile is displayed in the API response preview field:

The returned profile information will vary depending on the Salesforce account used in the test.

You can verify Salesforce profile fields by completing the following procedure:

  1. From the Engage Dashboard home page, click the Manage Providers icon:
  2. From the Configure Providers page, click Salesforce.
  3. Profile information returned from Salesforce is displayed onscreen. For example:

See Also


Assigning a Different Salesforce App for Social Login

Back to top


If you want to use a different Salesforce app or if you need to change your existing app, you must update the Salesforce provider configuration settings. To do that, complete the following procedure:

  1. From the Engage Dashboard home page, click the Manage Providers icon:
  2. From the Configure Providers page, click Salesforce.
  3. Click the green Configured button to display the Salesforce is currently enabled dialog box:
  4. To change the Salesforce configuration, click Modify these settings.
  5. In the Salesforce dialog box, change the Consumer Key and/or Consumer Secret as needed, and then click Save:

Although you can modify your Salesforce settings, you cannot delete those settings. If you delete the settings and then try to save your changes, you’ll see the error message Please enter your Consumer Key and Secret exactly as Salesforce shows them.

This means that you cannot “unconfigure” the provider: once configured, the Salesforce icon will always be shown as green (i.e., configured) in the Social Login Dashboard.



Removing Salesforce as a Social Login Provider

Back to top


If you no longer want to use Salesforce for social login, you can remove Salesforce as a social login provider by completing the following procedure:

  1. Log on to your Social Login Dashboard (https://dashboard.janrain.com).
  2. From the Dashboard home page, click the Manage Engage Dashboard icon.
  3. From the Engage Dashboard home page, in the Widgets and SDKs section, click Sign-Ins.
  4. From the Sign-in page, verify that Widget is selected and then expand Providers.
  5. In the widget, click the X in the upper right corner of the Salesforce icon.
  6. Scroll to the bottom of the page, select Save and Publish, and then click Publish. Salesforce no longer appears in the sign-on widget.
Note. You must always have at least one social login provider in the widget. If you delete all the providers and then click Publish, you’ll see the error message Couldn’t save configuration: No providers.