Skip to content

Support different OIDC issuer for desktop #246

@xgroleau

Description

@xgroleau

Problem

Both web and desktop clients share one issuer (OC_OIDC_ISSUER) but have different client id and redirect URI.
So the desktop app (which has its own client ID and redirect URI) fails authentication as it uses

Steps to Reproduce

  1. In Authentik, create two apps:
    • web (ID: web, issuer https://auth.domain.com/application/o/opencloud/, redirect regex: ^https:\/\/opencloud\.domain\.com\/.*$)
    • desktop (ID: OpenCloudDesktop, issuer https://auth.domain.com/application/o/opencloud-desktop/, redirect regex: ^http:\/\/(127\.0\.0\.1|localhost).*$)
  2. Set OC_OIDC_ISSUER to the web URL and OC_OIDC_CLIENT_ID=web.
  3. Set OC_OIDC_ISSUER=https://auth.domain.com/application/o/opencloud/.
  4. Launch the desktop app → it still uses the web issuer and client ID, and auth fails.
    • uses https://auth.domain.com/application/o/opencloud/ instead of https://auth.domain.com/application/o/opencloud-desktop/ (expected since there is no way to configure that)

Expected

Add support for per-client overrides (e.g. DESKTOP_OIDC_ISSUER and DESKTOP_OIDC_CLIENT_ID) on the serveer so each app can point to its own OIDC endpoint if possible.

Or allow to specify the issuer directly in the desktop app instead of using the default web one.

Environment

Authentik for OIDC, Caddy reverse proxy, OpenCloud (2.0.2), OpenCloud desktop 1.0.0

Workaroud

As for now, we can simply use WEB_OIDC_CLIENT_ID=OpenCloudDesktop and use only one issuer and support both web and desktop redirect URI. This allows both the web client and desktop client uses the same issuer.

This might be more relevant to the opencloud repo instead of desktop depending on the path to solve the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions