-
Notifications
You must be signed in to change notification settings - Fork 26
Description
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
- In Authentik, create two apps:
- web (ID:
web, issuerhttps://auth.domain.com/application/o/opencloud/, redirectregex: ^https:\/\/opencloud\.domain\.com\/.*$) - desktop (ID:
OpenCloudDesktop, issuerhttps://auth.domain.com/application/o/opencloud-desktop/, redirectregex: ^http:\/\/(127\.0\.0\.1|localhost).*$)
- web (ID:
- Set
OC_OIDC_ISSUERto the web URL andOC_OIDC_CLIENT_ID=web. - Set
OC_OIDC_ISSUER=https://auth.domain.com/application/o/opencloud/. - 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 ofhttps://auth.domain.com/application/o/opencloud-desktop/(expected since there is no way to configure that)
- uses
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