Connect your app to Facebook

To connect your Auth0 app to Facebook, you will need to generate a Client ID and Client Secret in a Facebook app, copy these keys into your Auth0 settings, and enable the connection.

1. Login to Facebook Developers

Go to Facebook Developers and login with your account. Select Add a New App from the dropdown in the upper right:

Add a New App

2. Name your application

Provide a Display Name and Contact Email.

Select a Category and click Create App ID:

Create a New App

Complete the Security Check.

3. Setup Facebook Login

On the Product Setup page that follows, click Get Started next to Facebook Login:

Click Get Started

This will bring up Client OAuth Settings for Facebook Login.

Client OAuth Settings

Enter the following URL in the Valid OAuth redirect URIs field:

https://YOUR_AUTH0_DOMAIN/login/callback

Enter OAuth redirect URI

Click Save Changes.

4. Get your App ID and App Secret

Click Settings in the left nav. On this page you can retrieve your App ID and App Secret.

Settings page

Click Show to reveal the App Secret (you may be required to re-enter your Facebook password).

In a seperate tab or window, go to the Connections > Social section of the Auth0 dashboard.

Click on the box with the Facebook logo.

This will bring up the Facebook connection settings.

Copy the App ID and App Secret from the Settings of your app on Facebook:

Auth0 Facebook Settings

Select all the Attributes and Permissions you want to enable.

Note: Your users will be able to choose which Attributes they wish to share, and by default this selection is only made when they first authorize the application. Click here to learn more about handling declined permissions.

Then click the Clients tab and select the applications you wish to enable this connection for.

Enable clients

When finished click Save.

6. Test the Connection

In the Connections > Social section of the Auth0 dashboard a TRY icon will now be displayed next to the Facebook logo:

Click Try

Click TRY.

The Facebook allow access dialog will appear.

Continue

Click continue and if configured correctly, you will see the It works!!! page:

Additional Info:

Creating a Test App: Facebook now allows you to test your application by creating a copy of it to use for testing purposes. If you create a test application it will have a seperate App ID and App Secret, make sure to enter the app data of the desired app into Auth0.

Deauthorize Callback URL: On the Facebook Login Client OAuth Settings page, you can also set a Deauthorize Callback URL to be called when a user deauthorizes your app.

Facebook Docs for Facebook Login