Connect to Facebook with OpenID Connect
FoxIDs can be connected to Facebook with OpenID Connect and authenticate users with Facebook login or Facebook Limited login.
You can test the Facebook login with the online web app sample (sample docs) by clicking
Log in
and then
Take a look at the Facebook sample configuration in FoxIDs Control: https://control.foxids.com/test-corp
Get read access with the userreader@foxids.com
and passwordTestAccess!
then select theProduction
environment and theAuthentication
tab.
Configure Facebook
This chapter describes how to configure a connection with OpenID Connect Authorization Code flow and read the users claims from the ID token.
1 - Start by creating an OpenID Connect authentication method in FoxIDs Control Client
Navigate to the Authentication tab
Click New authentication
Select OpenID Provider
Add the Name e.g. Facebook
Add the Facebook Authority, you can either select to use Facebook login with the
https://www.facebook.com/
authority or Facebook Limited login with thehttps://limited.facebook.com/
authorityRead the Redirect URL and save it for later
2 - Then go to the Facebook developer dashboard and create the a new App
Navigate to My Apps in the top right corner
Click Create App
Select Authenticate and request data from users with Facebook Login
Click Next
Probably select No, I'm not building a game
Click on Next
Fill in the required details
Click on Create app
Enter your Facebook password and the app is created
Click Customize adding a Facebook Login button
Click Go to settings
Add the FoxIDs Redirect URL from before in the Valid OAuth Redirect URIs field
Click Save changes in the bottom right corner
In the Permissions section click Add next to email permission, which change the status to Ready for testing.
Click Go back
In the left navigation bar, click App settings then select Basic
Read the App ID and App Secret and save it for later
Fill in the required details
3 - Go back to the FoxIDs authentication method in FoxIDs Control Client
- Click Show advanced in the top right corner of this configuration section
- Add the Optional custom SP client ID from Facebook called App ID
- Add the two scopes
email
andpublic_profile
- Set the Use PKCE switch to No
- Add the Client secret from Facebook called App Secret
- Set the Read claims from the ID token instead of the access token switch to Yes
- As Response mode select query
- Click Create
- Click Test authentication to test the Facebook connection
That's it, you are done.
Your new Facebook authentication method can be selected as an allowed authentication method in an application registration.