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.
    • Create a new app and copy the consumer key and consumer secret.
       
  3. Use the Janrain Dashboard configure Salesforce as a social login provider.

In This Configuration Guide

  • Creating a Salesforce App for Social Login
  • Using an Existing Salesforce App for Social Login
  • Configuring Salesforce as a Social Login Provider
  • Testing Salesforce Social Login
  • Assigning a Different Salesforce App for Social Login
  • Removing Salesforce as a Social Login Provider

Creating a Salesforce App

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. From 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. This can be the same name as your connected app name; however, the API name cannot contain any blank spaces.
    • Your email address in the Contact Email field.
  2. Select Enable OAuth Settings.
  3. 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 Janrain domain, your redirect URL will look similar to this: https://greg-stemp.rpxnow.com/salesforce/callback.
  4. From the Available OAuth Scopes list, select the following three 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)
    • Perform requests on your behalf at any time (refresh_token, offline_access)
  5. Select Require Secret for Web Server Flow.
  6. Scroll to the bottom the page and then click Save:

  1. On the New Connected App page, click Continue:

  1. From the home page for your new app, click Click to reveal to display your consumer secret:

  1. Copy the Consumer Key and the Consumer Secret. You can copy this information to a text editor, then close the text editor after you have configured Janrain social login:

  1. Log off from the Salesforce Developer center.

Using an Existing Salesforce App for Social Login

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 click App 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 and save the Consumer Key and the Consumer Secret. You can copy this information to a text editor, then close the text editor after you have configured Janrain social login:

  1. Log off from the Salesforce Developers site.

Configuring Salesforce as a Social Login Provider

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 Janrain 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:

  1. 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.
  2. 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

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:

  1. In the Allow Access? | Salesforce window, click Allow, and then log on using a valid Salesforce account:

  1. 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:

  1. From the Configure Providers page, click Salesforce.
  2. Profile information returned from Salesforce is displayed onscreen. For example:

See Also


Assigning a Different Salesforce App for Social Login

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:

  1. From the Configure Providers page, click Salesforce.
  2. Click the green Configured button to display the Salesforce is currently enabled dialog box:

  1. To change the Salesforce configuration, click Modify these settings.
  2. 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 Janrain Dashboard.


Removing Salesforce as a Social Login Provider

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 Janrain 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.