From e3011eab9a9e7ae8bfd0b318d9ac1237cbef54ae Mon Sep 17 00:00:00 2001 From: 4d62 Date: Thu, 2 Jan 2025 16:35:21 -0500 Subject: [PATCH] website/integrations: komga: document (#12476) * website/integrations/komga: add integration to sidebar Adds the Komga integration to the sidebar Signed-off-by: 4d62 * website/integrations: komga: main body Rewrite previous documentation. Update YML to new format as per the example in the [advanced configuration documentation](https://komga.org/docs/installation/oauth2/#advanced-configuration). Just a few changes Signed-off-by: 4d62 * website/integrations: komga: add user-name-attribute warning & change default Updates the default `user-name-attribute` from `sub` to `preferred_username` (I would assume that's what users prefer if there's collaboration, idk) & adds a warning similar to what I did in that latest Mastodon MR. Signed-off-by: 4d62 * website/integrations: komga: fix Fixes markdown for service link and updates `authentik.company` placeholder. Signed-off-by: 4d62 * website/integrations: komga: cleanup phrasing Restructures the "authentik configuration" section and updates the first sentence of the "Komga configuration" section Signed-off-by: 4d62 * website/integrations: komga: lint Lints modified file with Prettier. Signed-off-by: 4d62 * website/integrations: komga: fix bold elements Accidentally removed bold from step 1 of "authentik configuration". This fixes the issue. Signed-off-by: 4d62 * website/integrations: komga: remove hyphen from yml Others don't have it so this one should not Signed-off-by: 4d62 * website/integrations: komga: Address review comments Addresses comments & applies suggestions from the first review round. --------- Signed-off-by: 4d62 --- website/integrations/services/komga/index.md | 61 ++++++++++++++++++++ website/sidebarsIntegrations.js | 1 + 2 files changed, 62 insertions(+) create mode 100644 website/integrations/services/komga/index.md diff --git a/website/integrations/services/komga/index.md b/website/integrations/services/komga/index.md new file mode 100644 index 0000000000..beb2d3af01 --- /dev/null +++ b/website/integrations/services/komga/index.md @@ -0,0 +1,61 @@ +--- +title: Integrate with Komga +sidebar_label: Komga +--- + +# Komga + +Support level: Community + +## What is Komga + +> Komga is an open-source comic and manga server that lets users organize, read, and stream their digital comic collections with ease. +> +> -- https://komga.org/ + +## Preparation + +The following placeholders are used in this guide: + +- `komga.company` is the FQDN of the Komga install. +- `authentik.company` is the FQDN of the authentik install. + +## authentik configuration + +1. From the **authentik Admin interface**, navigate to **Applications** -> **Applications**. +2. Use the wizard to create a new application and provider. During this process: + - Note the **Client ID**, **Client Secret**, and **slug** values because they will be required later. + - Set the redirect URI to `https://komga.company/login/oauth2/code/authentik`. + - Select any available signing key. + +## Komga configuration + +To configure Komga, update its `application.yml` file to include the following options: + +:::info +All configuration options can be found in [Komga's OAuth2 Advanced configuration documentation](https://komga.org/docs/installation/oauth2/#advanced-configuration). +::: + +:::warning +You can configure Komga to use either the `sub` or `preferred_username` as the UID field under `user-name-attribute`. When using `preferred_username` as the user identifier, ensure that the [**Allow users to change username** setting](https://docs.goauthentik.io/docs/sys-mgmt/settings#allow-users-to-change-username) is disabled to prevent authentication issues. The `sub` option uses a unique, stable identifier for the user, while `preferred_username` uses the username configured in authentik. +::: + +```yml +spring: + security: + oauth2: + client: + registration: + authentik: + provider: authentik + client-id: + client-secret: + client-name: authentik + scope: openid,email + authorization-grant-type: authorization_code + redirect-uri: "{baseUrl}/{action}/oauth2/code/{registrationId}" + provider: + authentik: + user-name-attribute: preferred_username + issuer-uri: https://authentik.company/application/o// +``` diff --git a/website/sidebarsIntegrations.js b/website/sidebarsIntegrations.js index 19d9df6249..e75a355a09 100644 --- a/website/sidebarsIntegrations.js +++ b/website/sidebarsIntegrations.js @@ -127,6 +127,7 @@ module.exports = { "services/home-assistant/index", "services/immich/index", "services/jellyfin/index", + "services/komga/index", "services/node-red/index", "services/sonar-qube/index", "services/sonarr/index",