Adding an identity provider - Facebook
Adding Facebook as an external identity provider (IdP) gives your users the option to sign in with Facebook when accessing your application.
Before you begin
Ensure that the application is added to PingOne.
Set the Grant Type for the application to Implicit. |
Learn more in Adding an application.
Registering your application with Facebook for Developers
Facebook will generate an app ID and app secret for your application. You’ll need these values to connect the application to PingOne.
Steps
-
Go to Facebook for Developers at https://developers.facebook.com.
If you haven’t created a Facebook Developer Account, you can do so now.
-
At the top of the page, click My Apps, click Create app, select the appropriate application type, and then click Continue.
-
Enter the following information:
-
App Display name: The name you want to associate with this application ID.
-
App Contact email: The primary contact information for the application.
-
-
Click Create app, and then complete the security check, if required.
Result:
The application dashboard is displayed.
-
On the left side of the page, click Settings → Basic.
-
Enter the following information:
-
App domains: (Leave this value blank for now.) The path in your application that users are redirected to after they have authenticated with Facebook.
-
Privacy policy URL: (Optional). The URL that contains your privacy policy.
-
Terms of service URL: (Optional). The URL that contains your terms of service.
-
-
At the top of the page, locate the App ID and App secret.
-
Copy the values and paste them in a secure location.
-
Click Save changes.
Next steps
For more information, see https://developers.facebook.com/docs/apps.
Enabling Facebook login
You must enable Facebook login for your application if it’s not enabled already.
Steps
-
Go to Facebook for Developers at https://developers.facebook.com.
-
At the top of the page, click My Apps, and then select the appropriate app.
-
On the left side of the page, click Products
-
Locate the Facebook login card and click Set up.
-
Follow the instructions to set up Facebook login.
Adding Facebook as an identity provider in PingOne
Configure the identity provider connection in PingOne.
Before you begin
Ensure that registration is enabled in the appropriate authentication policy. See Editing an authentication policy.
You should have the following information ready:
-
App ID
-
App secret
Steps
-
Go to Integrations → External IdPs.
-
Click Add provider.
-
Click Facebook.
-
On the Create Profile page, enter the following information:
-
Name: A unique identifier for the identity provider.
-
Description: (Optional). A brief description of the identity provider.
You cannot change the icon and login button, in accordance with the provider’s brand standards.
-
-
Click Continue.
-
On the Configure Connection page, enter the following information:
-
App ID: The application ID that you copied earlier from the IdP. You can find this information on the Basic settings page in the Facebook for Developers portal.
-
App Secret: The application secret that you copied earlier from the IdP. You can find this information on the Basic settings page on the Facebook for Developers portal.
-
-
Click Save and Continue.
-
On the Map Attributes page, define how the PingOne user attributes are mapped to identity provider attributes. For more information, see Mapping attributes.
-
Enter the PingOne user profile attribute and the external IdP attribute. For more information about attribute syntax, see Identity provider attributes.
-
To add an attribute, click Add attribute.
-
To use the expression builder, click Build and test or Advanced Expression. See Using the expression builder.
-
Select the update condition, which determines how PingOne updates its user directory with the values from the identity provider. The options are:
-
Empty only: Update the PingOne attribute only if the existing attribute is empty.
-
Always: Always update the PingOne directory attribute.
You can also map the PingOne attribute
Email Address
to the Facebook attributeEmail
.
If you don’t map a value for PingOne
Email Address
, the user must verify their email address when they sign on. -
-
-
Click Save and Finish.
Adding the callback URL to Facebook for Developers
In PingOne, copy the callback URL and paste it in the Facebook for Developers login settings.
Steps
-
In PingOne, go to Integrations → External IdPs.
-
Locate the appropriate identity provider (IdP) and click the details icon to expand the IdP.
-
Click the Connection tab.
-
Copy the callback URL and paste it to a secure location.
-
Go to Facebook for Developers at https://developers.facebook.com.
-
At the top of the page, click My Apps, and then select the appropriate app.
-
On the left side of the page, click Facebook Login → Settings.
-
For Valid OAuth Redirect URIs, paste the value that you copied from the PingOne console.
Next steps
-
Enable the external identity provider. See Enabling or disabling an identity provider.
-
Add the identity provider to your authentication policy. See Editing an authentication policy.
-
Add the authentication policy to your application. See Applications.