Facebook OAuth2 Configuration
1. Overview
This guide explains how to configure the Registration Portal to authenticate users via Facebook Login. Facebook uses OAuth2 but does not fully implement OIDC — it lacks OIDC Discovery and issues opaque access tokens rather than JWTs.
2. Prerequisites
-
A Meta for Developers account
-
A Facebook App (create one if not yet available)
3. Facebook App Setup
3.1. Create or Configure App
-
Navigate to My Apps
-
Click Create App or select an existing app
-
Choose app type: Consumer (for public login)
3.2. Add Facebook Login Product
-
In the app dashboard, click + Add Product
-
Select Facebook Login for Business or Facebook Login
-
Choose Web as the platform
3.3. Configure OAuth Settings
Navigate to Facebook Login > Settings and configure:
| Field | Value |
|---|---|
Valid OAuth Redirect URIs |
|
Client OAuth Login |
Enabled |
Web OAuth Login |
Enabled |
Enforce HTTPS |
Yes (production) |
Login with the JavaScript SDK |
No (server-side flow) |
|
Each tenant domain requires its own redirect URI entry. For example:
|
4. Registration Portal Configuration
Create a TenantIdentityProvider record with the following values:
| Field | Value |
|---|---|
|
|
|
"Sign in with Facebook" |
|
App ID from Facebook Developer Portal |
|
App Secret (encrypted at rest) |
|
(leave null — Facebook does not support OIDC Discovery) |
|
|
|
|
|
|
|
(leave null — Facebook uses opaque tokens) |
|
|
|
|
|
|
|
Facebook does not support OIDC Discovery. All endpoint URIs must be configured explicitly via override fields. The |
5. Facebook-Specific Behaviour
| Characteristic | Detail |
|---|---|
OIDC Compliance |
Not OIDC — standard OAuth2 only |
Token Type |
Opaque access token (not JWT) |
No ID Token |
Facebook does not issue ID tokens; user info is fetched via the Graph API |
Subject Identifier |
Numeric string ( |
User Info |
Fetched via |
Token Validation |
Opaque tokens cannot be validated via JWKS; use Facebook’s debug_token API for server-side validation |
PKCE |
Not supported by Facebook |
API Versioning |
Facebook API is versioned (e.g., |
6. Token Exchange Considerations
Since Facebook issues opaque access tokens (not JWTs), the Gateway’s BackendTokenExchangeSuccessHandler extracts user identity from the OAuth2User principal (populated by Spring Security’s userInfo call) rather than from a JWT ID token.
The validated claims (sub, email, name) sent to the admin-service token exchange endpoint are the same regardless of provider — the admin-service does not need to know whether the user logged in via Facebook or Google.
7. App Review
For production use beyond app administrators and testers:
-
Submit the app for App Review in the Facebook Developer Portal
-
Request the
emailpermission (requires justification) -
public_profileis granted by default
Until approved, only users listed in Roles > Test Users or Roles > Administrators can log in.