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.
This doc refers to the client steps to connect your client. If you are looking to manage authentication in your application, see Next Steps below.
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.
Select a Category and click Create App ID:
Complete the Security Check.
3. Setup Facebook Login
On the Product Setup page that follows, click Get Started next to Facebook Login:
This will bring up Client OAuth Settings for Facebook Login.
Enter the following URL in the Valid OAuth redirect URIs field:
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.
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.
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 account. 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 account used for testing purposes. A new account can be created in the Dashboard by clicking on your account name in the top right corner and selecting New Account 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.
For detailed instructions and samples for a variety of technologies, refer to our quickstarts:
For more background information on client authentication refer to Client Authentication.