---
apiVersion: v1
kind: ConfigMap
metadata:
  name: vikunja-config-yml
  namespace: collab
data:
  config.yml: |
    auth:
      # Local authentication will let users log in and register (if enabled) through the db.
      # This is the default auth mechanism and does not require any additional configuration.
      local:
        # Enable or disable local authentication
        enabled: true
      # OpenID configuration will allow users to authenticate through a third-party OpenID Connect compatible provider.
      # The provider needs to support the `openid`, `profile` and `email` scopes.
      # **Note:** Some openid providers (like gitlab) only make the email of the user available through openid claims if they have set it to be publicly visible.
      # If the email is not public in those cases, authenticating will fail.
      # **Note 2:** The frontend expects to be redirected after authentication by the third party
      # to <frontend-url>/auth/openid/<auth key>. Please make sure to configure the redirect url with your third party
      # auth service accordingly if you're using the default Vikunja frontend.
      # Take a look at the [default config file](https://kolaente.dev/vikunja/api/src/branch/main/config.yml.sample) for more information about how to configure openid authentication.
      openid:
        # Enable or disable OpenID Connect authentication
        enabled: true
        # The url to redirect clients to. Defaults to the configured frontend url. If you're using Vikunja with the official
        # frontend, you don't need to change this value.
        redirecturl: https://tasks.holthome.net/auth/openid/
        # A list of enabled providers
        providers:
          # The name of the provider as it will appear in the frontend.
          - name: authentik
            # The auth url to send users to if they want to authenticate using OpenID Connect.
            authurl: https://id.holthome.net/application/o/vikunja/
            # The client ID used to authenticate Vikunja at the OpenID Connect provider.
            clientid: vikunja
            # The client secret used to authenticate Vikunja at the OpenID Connect provider.
            clientsecret: ${SECRET_AUTHENTIK_VIKUNJA_CLIENT_SECRET}
