Use these steps to set up Facebook as your identity provider.
-
Go to go to developers.facebook.com.
-
Click Create App at the top-right.
The Create a New App ID card displays.
-
Enter the Display Name and Contact Email.
-
Click Create App ID. The Create a New App ID window displays.
-
Enter the CAPTCHA code to proceed.
-
Click Submit.
-
On the Facebook Login card, click Set Up.
A Quickstart card displays offering platform choices.
-
Click Web. The Web tab displays.
-
Enter your Site URL.
-
Click Save.
-
Click Continue. Ignore any JavaScript page that suggests that you install it on your site.
-
Click Settings > Basic on the left-hand menu.
-
On the Zero Trust dashboard, navigate to Settings > Authentication.
-
Under Login methods, click Add new.
-
Copy the App ID and App Secret into the OAuth ID and OAuth Secret fields.
-
Click Save.
-
On developers.facebook.com, set the Use Strict Mode for Redirect URIs slider to Yes.
-
In the Valid OAuth redirect URIs field, enter your team domain , followed by this callback at the end of the path:
/cdn-cgi/access/callback
. For example:https://<your-team-name>.cloudflareaccess.com/cdn-cgi/access/callback
-
Click Save Changes.
-
On the Zero Trust dashboard, click Save.
To test that your connection is working, navigate to Authentication > Login methods and click Test next to Facebook.
Example API Configuration
{
"config": {
"client_id": "<your client id>",
"client_secret": "<your client secret>"
},
"type": "facebook",
"name": "my example idp"
}