2022-08-26 01:39:00 +00:00
|
|
|
---
|
|
|
|
title: "Komga"
|
|
|
|
description: "Integrating Komga with the Authelia OpenID Connect Provider."
|
|
|
|
lead: ""
|
2022-09-01 02:24:47 +00:00
|
|
|
date: 2022-08-26T11:39:00+10:00
|
2022-08-26 01:39:00 +00:00
|
|
|
draft: false
|
|
|
|
images: []
|
|
|
|
menu:
|
|
|
|
integration:
|
|
|
|
parent: "openid-connect"
|
|
|
|
weight: 620
|
|
|
|
toc: true
|
|
|
|
community: true
|
|
|
|
---
|
|
|
|
|
|
|
|
## Tested Versions
|
|
|
|
|
|
|
|
* [Authelia]
|
|
|
|
* [v4.36.4](https://github.com/authelia/authelia/releases/tag/v4.36.4)
|
2022-08-26 03:26:58 +00:00
|
|
|
* [Komga]
|
2022-08-26 01:39:00 +00:00
|
|
|
* [v0.157.1](https://github.com/gotson/komga/releases/tag/v0.157.1)
|
|
|
|
|
|
|
|
## Before You Begin
|
|
|
|
|
2022-10-20 04:27:09 +00:00
|
|
|
### 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.
|
|
|
|
|
2022-10-20 04:42:22 +00:00
|
|
|
[Generating Client Secrets]: ../specific-information.md#generating-client-secrets
|
|
|
|
|
2022-10-20 04:27:09 +00:00
|
|
|
### Assumptions
|
2022-08-26 01:39:00 +00:00
|
|
|
|
|
|
|
This example makes the following assumptions:
|
|
|
|
|
|
|
|
* __Application Root URL:__ `https://komga.example.com`
|
|
|
|
* __Authelia Root URL:__ `https://auth.example.com`
|
2022-08-26 03:26:58 +00:00
|
|
|
* __Client ID:__ `komga`
|
2022-08-26 01:39:00 +00:00
|
|
|
* __Client Secret:__ `komga_client_secret`
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
### Application
|
|
|
|
|
|
|
|
To configure [Komga] to utilize Authelia as an [OpenID Connect] Provider:
|
|
|
|
|
2022-08-26 03:26:58 +00:00
|
|
|
1. Configure the security section of the [Komga] configuration:
|
|
|
|
```yaml
|
|
|
|
komga:
|
|
|
|
## Comment if you don't want automatic account creation.
|
|
|
|
oauth2-account-creation: true
|
|
|
|
spring:
|
2022-08-26 01:39:00 +00:00
|
|
|
security:
|
|
|
|
oauth2:
|
|
|
|
client:
|
|
|
|
registration:
|
|
|
|
authelia:
|
2022-08-26 03:26:58 +00:00
|
|
|
client-id: `komga`
|
2022-08-26 01:39:00 +00:00
|
|
|
client-secret: `komga_client_secret`
|
|
|
|
client-name: Authelia
|
2022-08-26 03:26:58 +00:00
|
|
|
scope: openid,profile,email
|
2022-08-26 01:39:00 +00:00
|
|
|
authorization-grant-type: authorization_code
|
|
|
|
redirect-uri: "{baseScheme}://{baseHost}{basePort}{basePath}/login/oauth2/code/authelia"
|
|
|
|
provider:
|
|
|
|
authelia:
|
2022-08-26 03:26:58 +00:00
|
|
|
issuer-uri: https://auth.example.com
|
|
|
|
user-name-attribute: preferred_username
|
2022-08-26 01:39:00 +00:00
|
|
|
````
|
|
|
|
|
|
|
|
### Authelia
|
|
|
|
|
|
|
|
The following YAML configuration is an example __Authelia__
|
2022-08-26 03:26:58 +00:00
|
|
|
[client configuration](../../../configuration/identity-providers/open-id-connect.md#clients) for use with [Komga]
|
2022-08-26 01:39:00 +00:00
|
|
|
which will operate with the above example:
|
|
|
|
|
|
|
|
```yaml
|
2022-08-26 03:26:58 +00:00
|
|
|
- id: komga
|
|
|
|
description: Komga
|
2022-10-20 03:21:45 +00:00
|
|
|
secret: '$plaintext$komga_client_secret'
|
2022-08-26 03:26:58 +00:00
|
|
|
public: false
|
|
|
|
authorization_policy: two_factor
|
|
|
|
redirect_uris:
|
|
|
|
- https://komga.example.com/login/oauth2/code/authelia
|
|
|
|
scopes:
|
|
|
|
- openid
|
2022-09-24 21:44:00 +00:00
|
|
|
- profile
|
2022-08-26 03:26:58 +00:00
|
|
|
- email
|
|
|
|
grant_types:
|
|
|
|
- authorization_code
|
|
|
|
userinfo_signing_algorithm: none
|
2022-08-26 01:39:00 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## See Also
|
|
|
|
|
2022-08-26 03:26:58 +00:00
|
|
|
* [Komga Configuration options Documentation](https://komga.org/installation/configuration.html)
|
2022-08-26 01:39:00 +00:00
|
|
|
* [Komga Social login Documentation](https://komga.org/installation/oauth2.html)
|
|
|
|
|
|
|
|
[Authelia]: https://www.authelia.com
|
|
|
|
[Komga]: https://www.komga.org
|
|
|
|
[OpenID Connect]: ../../openid-connect/introduction.md
|