Setting Up Facebook as a Social Identity Provider
As suggested in the introduction to this chapter, you'll need to take the following basic steps to configure Facebook as a social identity provider for IDM:
Note
As of October 2018, Facebook as a social identity provider requires access over secure HTTP (HTTPS).
Setting Up Facebook
To set up Facebook as a social identity provider, navigate to the Facebook for Developers page. You'll need a Facebook account. While you could use a personal Facebook account, it is best to use an organizational account to avoid problems if specific individuals leave your organization. When you set up a Facebook social identity provider, you'll need to perform the following tasks:
In the Facebook for Developers page, select My Apps and Add a New App. For IDM, you'll create a
Website
application.You'll need to include the following information when creating a Facebook website application:
Display Name
Contact Email
IDM URL
When complete, you should see your App. Navigate to Basic Settings.
Make a copy of the
App ID
andApp Secret
for when you configure the Facebook social identity provider in IDM.In the settings for your App, you should see an entry for
App Domains
, such asexample.com
, as well as a Website Site URL, such ashttps://idm.example.com/
.
For Facebook's documentation on the subject, see Facebook Login for the Web with the JavaScript SDK.
Configuring a Facebook Social Identity Provider
To configure a Facebook social identity provider, log in to the Admin UI and navigate to Configure > Social ID Providers.
Enable the Facebook social identity provider.
Include the values that Facebook created for
App ID
andApp Secret
, as described in "Setting Up Facebook".Under regular and
Advanced Options
, include the options shown in the following appendix: "Facebook Social Identity Provider Configuration Details".
When you enable a Facebook social identity provider in the Admin UI, IDM generates the identityProvider-facebook.json
file in your project's conf/
subdirectory.
It includes parts of the file that you may have configured through the Admin UI. While the labels in the UI specify App ID and App Secret, you'll see them as clientId
and clientSecret
, respectively, in the configuration file.
{ "provider" : "facebook", "authorizationEndpoint" : "https://www.facebook.com/dialog/oauth", "tokenEndpoint" : "https://graph.facebook.com/v2.7/oauth/access_token", "userInfoEndpoint" : "https://graph.facebook.com/me?fields=id,name,picture,email,first_name,last_name,locale" "clientId" : "<someUUID>", "clientSecret" : { "$crypto" : { "type" : "x-simple-encryption", "value" : { "cipher" : "AES/CBC/PKCS5Padding", "stableId" : "openidm-sym-default", "salt" : "<hashValue>", "data" : "<encryptedValue>", "keySize" : 16, "purpose" : "idm.config.encryption", "iv" : "<encryptedValue>", "mac" : "<hashValue>" } } }, "scope" : [ "email", "user_birthday" ], ...
You should also see UI settings related to the social identity provider icon (badge) and the sign-in button, described in "Social Identity Provider Button and Badge Properties".
You'll see links related to the authenticationIdKey
, redirectUri
, and configClass
; the location may vary.
The file includes schema
information, which includes properties for each social identity account, as collected by IDM, as well as the order in which it appears in the Admin UI. When you've registered a user with a Facebook social identity, you can verify this by selecting Manage > Facebook, and then selecting a user.
Another part of the file includes a propertyMap
, which maps user information entries between the source
(social identity provider) and the target
(IDM).
If you need more information about the properties in this file, refer to the following appendix: "Facebook Social Identity Provider Configuration Details".
Configuring User Registration to Link to Facebook
Once you've configured the Facebook social identity provider, you can activate it through User Registration. To do so in the Admin UI, select Configure > User Registration, and under the Social tab, enable the option associated with Social Registration. For more information about user self-service features, see "Self-Service End User UI".
When you enable social registration, you're allowing users to register on IDM through all active social identity providers.