Komga

Tested Versions

Before You Begin

Common Notes

  1. You are required to utilize a unique client id for every client.
  2. The client id on this page is merely an example and you can theoretically use any alphanumeric string.
  3. You should not use the client secret in this example, We strongly recommend reading the Generating Client Secrets guide instead.

Assumptions

This example makes the following assumptions:

  • Application Root URL: https://komga.example.com
  • Authelia Root URL: https://auth.example.com
  • Client ID: komga
  • Client Secret: komga_client_secret

Configuration

Application

To configure Komga to utilize Authelia as an OpenID Connect 1.0 Provider:

  1. Configure the security section of the Komga configuration:
komga:
  ## Comment if you don't want automatic account creation.
  oauth2-account-creation: true
spring:
  security:
    oauth2:
      client:
        registration:
          authelia:
            client-id: `komga`
            client-secret: `komga_client_secret`
            client-name: Authelia
            scope: openid,profile,email
            authorization-grant-type: authorization_code
            redirect-uri: "{baseScheme}://{baseHost}{basePort}{basePath}/login/oauth2/code/authelia"
        provider:
          authelia:
            issuer-uri: https://auth.example.com
            user-name-attribute: preferred_username

Authelia

The following YAML configuration is an example Authelia client configuration for use with Komga which will operate with the above example:

- id: komga
  description: Komga
  secret: '$plaintext$komga_client_secret'
  public: false
  authorization_policy: two_factor
  redirect_uris:
    - https://komga.example.com/login/oauth2/code/authelia
  scopes:
    - openid
    - profile
    - email
  grant_types:
    - authorization_code
  userinfo_signing_algorithm: none

See Also