Prerequisites
- A Meta for Developers account
- Your Facebook App ID (client ID) and App Secret (client secret)
Configure Facebook OAuth
Create a Facebook app
- Go to Meta for Developers
- Click Create App
- Select a use case that includes Facebook Login (for example, “Authenticate and request data from users with Facebook Login”)
- Fill in the app details and finish the creation flow
- In the app dashboard, add the Facebook Login product if it is not already added
- Navigate to App settings > Basic to find your App ID and App Secret — you will need them in the next step
Set the authorized redirect URI
In your Facebook app dashboard:Replace
- Go to Facebook Login > Settings
- Under Valid OAuth Redirect URIs, add:
${YOUR_CUSTOM_DOMAIN} with your custom domain (e.g. session.yourapp.com).- Click Save changes
The redirect URI must match exactly. Make sure there is no trailing slash and that you are using
https.Create the Facebook OAuth configuration
| Field | Description |
|---|---|
client_id | Your Facebook App ID. |
client_secret | Your Facebook App Secret. |
enabled | Set to true to enable Facebook login. |
options.use_email_as_identifier | When true, the user’s Facebook email is stored as an email identifier. |
options.allow_email_account_merge | When true, if a user with the same email already exists, the Facebook account is linked to the existing user. |
Facebook only returns an email when the user grants the
email permission and their Facebook account has a verified email address. Users without a verified email on Facebook will sign in without an email identifier.