Connect your app to Facebook
To connect your Auth0 app to Facebook, you will need an App ID and App Secret from your Facebook app, then 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:
2. Name your application
Provide a Display Name and Contact Email.
Next you will need to complete the Security Check.
3. Setup Facebook Login
On the Product Setup page that follows, click Get Started next to Facebook Login:
Next choose the type of application, for this tutorial we have selected Web.
The Client OAuth Settings page for Facebook Login will appear:
Enter the following URL in the Valid OAuth redirect URIs field:
Find your Auth0 domain name
If your Auth0 domain name is not shown above, login to the dashboard to find your Tenant Name in the top right corner. Your Auth0 domain is this name (for example
.auth0.com. So for this example the Valid OAuth redirect URI would be:
Click Save Changes.
4. Make your App Public
Next, click on App Review on the left navigation bar. Near the top of the page under Make (Your App Name) App public? click to move the slider to Yes.
5. 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.
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:
Select all the Attributes and Permissions you want to enable.
Then click the Clients tab and select the applications you wish to enable this connection for.
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:
The Facebook allow access dialog will appear.
Click continue and if configured correctly, you will see the It works!!! page:
Create 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 it's own separate App ID and App Secret. Auth0 only allows one Facebook connection to be configured per tenant. One option for testing is that create the connection to the test connection and then change the values when you are ready to connect to the production application.
Another option is to create another Auth0 tenant used for testing purposes. A new tenant can be created in the Dashboard by clicking on your tenant name in the top right corner and selecting + Create Tenant from the dropdown. See the Setting Up Multiple Environments for more information on multiple environments.
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.
Now that you have a working connection, the next step is to configure your application to use it. You can follow our step-by-step quickstarts or use directly our libraries and API.