@@ -390,9 +390,6 @@ oidc_providers:
390
390
391
391
# ## Facebook
392
392
393
- Like Github, Facebook provide a custom OAuth2 API rather than an OIDC-compliant
394
- one so requires a little more configuration.
395
-
396
393
0. You will need a Facebook developer account. You can register for one
397
394
[here](https://developers.facebook.com/async/registration/).
398
395
1. On the [apps](https://developers.facebook.com/apps/) page of the developer
@@ -412,24 +409,28 @@ Synapse config:
412
409
idp_name: Facebook
413
410
idp_brand: "facebook" # optional: styling hint for clients
414
411
discover: false
415
- issuer: "https://facebook.com"
412
+ issuer: "https://www. facebook.com"
416
413
client_id: "your-client-id" # TO BE FILLED
417
414
client_secret: "your-client-secret" # TO BE FILLED
418
415
scopes: ["openid", "email"]
419
- authorization_endpoint: https://facebook.com/dialog/oauth
420
- token_endpoint: https://graph.facebook.com/v9.0/oauth/access_token
421
- user_profile_method: "userinfo_endpoint"
422
- userinfo_endpoint: "https://graph.facebook.com/v9.0/me?fields=id,name,email,picture"
416
+ authorization_endpoint: "https://facebook.com/dialog/oauth"
417
+ token_endpoint: "https://graph.facebook.com/v9.0/oauth/access_token"
418
+ jwks_uri: "https://www.facebook.com/.well-known/oauth/openid/jwks/"
423
419
user_mapping_provider:
424
420
config:
425
- subject_claim: "id"
426
421
display_name_template: "{{ user.name }}"
422
+ email_template: "{{ '{{ user.email }}' }}"
427
423
` ` `
428
424
429
425
Relevant documents :
430
- * https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow
431
- * Using Facebook's Graph API: https://developers.facebook.com/docs/graph-api/using-graph-api/
432
- * Reference to the User endpoint: https://developers.facebook.com/docs/graph-api/reference/user
426
+ * [Manually Build a Login Flow](https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow)
427
+ * [Using Facebook's Graph API](https://developers.facebook.com/docs/graph-api/using-graph-api/)
428
+ * [Reference to the User endpoint](https://developers.facebook.com/docs/graph-api/reference/user)
429
+
430
+ Facebook do have an [OIDC discovery endpoint](https://www.facebook.com/.well-known/openid-configuration),
431
+ but it has a `response_types_supported` which excludes "code" (which we rely on, and
432
+ is even mentioned in their [documentation](https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow#login)),
433
+ so we have to disable discovery and configure the URIs manually.
433
434
434
435
# ## Gitea
435
436
0 commit comments