@@ -390,9 +390,6 @@ oidc_providers:
390390
391391# ## Facebook
392392
393- Like Github, Facebook provide a custom OAuth2 API rather than an OIDC-compliant
394- one so requires a little more configuration.
395-
3963930. You will need a Facebook developer account. You can register for one
397394 [here](https://developers.facebook.com/async/registration/).
3983951. On the [apps](https://developers.facebook.com/apps/) page of the developer
@@ -412,24 +409,28 @@ Synapse config:
412409 idp_name: Facebook
413410 idp_brand: "facebook" # optional: styling hint for clients
414411 discover: false
415- issuer: "https://facebook.com"
412+ issuer: "https://www. facebook.com"
416413 client_id: "your-client-id" # TO BE FILLED
417414 client_secret: "your-client-secret" # TO BE FILLED
418415 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/"
423419 user_mapping_provider:
424420 config:
425- subject_claim: "id"
426421 display_name_template: "{{ user.name }}"
422+ email_template: "{{ '{{ user.email }}' }}"
427423` ` `
428424
429425Relevant 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.
433434
434435# ## Gitea
435436
0 commit comments