Salesforce social login guide
This provider is no longer supported.
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:
-
Obtain a Salesforce developer’s account from https://login.salesforce.com.
-
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.
-
Use the Social Login Dashboard configure Salesforce as a social login provider.
Create 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.
-
Log on to the Salesforce Lightning Developers site at https://login.salesforce.com.
-
From the Setup page, expand Apps and then click App Manager:
-
On the Lightning Experience App Manager setup page, click New Connected App:
-
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:
-
-
Select Enable OAuth Settings.
-
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:
-
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:
-
Scroll to the bottom of the page and then click Save.
-
On the New Connected App page, click Continue:
-
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.
-
Click Click to reveal next to your Consumer Secret and then click Copy to copy that secret:
-
Log off from the Salesforce Developer center.
Use 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:
-
Log on to the Salesforce Lightning Developers site at https://login.salesforce.com.
-
From the Setup page, expand Apps and then click App Manager:
-
From the Lightning Experience App Manager page, click the Options button for your app and then click View:
-
On the home page for your app, click Click to reveal:
-
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.
-
Click Copy to copy the consumer key:
-
Log off from the Salesforce Developers site.
Configure 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:
-
Log on to your Social Login Dashboard (https://dashboard.janrain.com).
-
From the Dashboard home page, click the Manage Engage Dashboard icon.
-
From the Engage Dashboard home page, in the Widgets and SDKs section, click Sign-Ins.
-
From the Sign-in page, verify that Widget is selected and then expand Providers.
-
From the list of Providers, click Salesforce.
-
In the Salesforce dialog box, click Next until you reach the screen requesting the consumer key and consumer secret:
-
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.
-
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.
Test Salesforce social login
To test Salesforce social login, complete the following procedure:
-
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.
-
-
From the Test page, click the Salesforce icon:
-
In the Allow Access? | Salesforce window, click Allow, and then log on using a valid Salesforce account:
-
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:
-
From the Engage Dashboard home page, click the Manage Providers icon:
-
From the Configure Providers page, click Salesforce.
-
Profile information returned from Salesforce is displayed onscreen. For example:
Assign 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:
-
From the Engage Dashboard home page, click the Manage Providers icon:
-
From the Configure Providers page, click Salesforce.
-
Click the green Configured button to display the Salesforce is currently enabled dialog box:
-
To change the Salesforce configuration, click Modify these settings.
-
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.
Remove 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:
-
Log on to your Social Login Dashboard (https://dashboard.janrain.com).
-
From the Dashboard home page, click the Manage Engage Dashboard icon.
-
From the Engage Dashboard home page, in the Widgets and SDKs section, click Sign-Ins.
-
From the Sign-in page, verify that Widget is selected and then expand Providers.
-
In the widget, click the X in the upper right corner of the Salesforce icon.
-
Scroll to the bottom of the page, select Save and Publish, and then click Publish. Salesforce no longer appears in the sign-on widget.
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.
Updated about 1 month ago