From 2f8c31c0f6ac0a95b6be3e64eb4b354ae1b2ed98 Mon Sep 17 00:00:00 2001 From: richvdh Date: Mon, 17 Jan 2022 12:35:28 +0000 Subject: deploy: b0352f9c08a16bf6c2abf4eeb014774f59e69458 --- develop/openid.html | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'develop/openid.html') diff --git a/develop/openid.html b/develop/openid.html index ba61865227..f1bbd3f2ff 100644 --- a/develop/openid.html +++ b/develop/openid.html @@ -533,8 +533,6 @@ https://developers.google.com/identity/protocols/oauth2/openid-connect#appsetup) display_name_template: '{{ user.name }}'

Facebook

-

Like Github, Facebook provide a custom OAuth2 API rather than an OIDC-compliant -one so requires a little more configuration.

  1. You will need a Facebook developer account. You can register for one here.
  2. @@ -556,25 +554,28 @@ and "App Secret" for use below. idp_name: Facebook idp_brand: "facebook" # optional: styling hint for clients discover: false - issuer: "https://facebook.com" + issuer: "https://www.facebook.com" client_id: "your-client-id" # TO BE FILLED client_secret: "your-client-secret" # TO BE FILLED scopes: ["openid", "email"] - authorization_endpoint: https://facebook.com/dialog/oauth - token_endpoint: https://graph.facebook.com/v9.0/oauth/access_token - user_profile_method: "userinfo_endpoint" - userinfo_endpoint: "https://graph.facebook.com/v9.0/me?fields=id,name,email,picture" + authorization_endpoint: "https://facebook.com/dialog/oauth" + token_endpoint: "https://graph.facebook.com/v9.0/oauth/access_token" + jwks_uri: "https://www.facebook.com/.well-known/oauth/openid/jwks/" user_mapping_provider: config: - subject_claim: "id" display_name_template: "{{ user.name }}" + email_template: "{{ '{{ user.email }}' }}"

    Relevant documents:

    +

    Facebook do have an OIDC discovery endpoint, +but it has a response_types_supported which excludes "code" (which we rely on, and +is even mentioned in their documentation), +so we have to disable discovery and configure the URIs manually.

    Gitea

    Gitea is, like Github, not an OpenID provider, but just an OAuth2 provider.

    The /user API endpoint -- cgit 1.5.1