diff --git a/docs/setup/sso.md b/docs/setup/sso.md index ba43ff2ba..0dafd9045 100644 --- a/docs/setup/sso.md +++ b/docs/setup/sso.md @@ -452,6 +452,40 @@ upstream_oauth2: template: "{{ user.preferred_username }}" ``` +### Discord + +1. Create a new application in the Discord Developer Portal (see [documentation](https://discord.com/developers/applications)) +2. Add the following "Redirect URI" in the OAuth2 tab under settings: `https:///upstream/callback/` + +Authentication service configuration: + +```yaml +upstream_oauth2: + providers: + - id: 01JQK7DK6VFH62NMW4HS9RKD3R + human_name: Discord + brand_name: "discord" + token_endpoint_auth_method: "client_secret_post" + issuer: "https://discord.com" + client_id: "" # TO BE FILLED + client_secret: "" # TO BE FILLED + fetch_userinfo: true + userinfo_endpoint: "https://discord.com/api/users/@me" + scope: "openid identify email" + claims_imports: + localpart: + action: suggest + template: "{{ user.username }}" + displayname: + action: suggest + template: "{{ user.global_name }}" + email: + action: suggest + template: "{{ user.email }}" + account_name: + template: "{{ user.username }}" +``` + ### Rauthy diff --git a/templates/components/idp_brand.html b/templates/components/idp_brand.html index 9781f09da..e0226c053 100644 --- a/templates/components/idp_brand.html +++ b/templates/components/idp_brand.html @@ -47,5 +47,7 @@ Please see LICENSE in the repository root for full details. + {% elif brand == "discord" %} + {% endif %} {% endmacro %}