feat(oidc): allow disabling client_secret on external flow - #1028
Closed
gekmihesg wants to merge 1 commit into
Closed
feat(oidc): allow disabling client_secret on external flow#1028gekmihesg wants to merge 1 commit into
gekmihesg wants to merge 1 commit into
Conversation
Add GOTIFY_OIDC_EXTERNALSECRET to allow omitting the client_secret from OIDC token exchange for the external (mobile app) flow. This is required to get OIDC to work with Microsoft Entra that rejects requests containing a client_secret for mobile and desktop applications as they are marked as public client (gotify://oidc/callback).
jmattheis
reviewed
Aug 12, 2026
| context.Background(), | ||
| conf.OIDC.Issuer, | ||
| conf.OIDC.ClientID, | ||
| "", // no secret, PKCE only |
Member
There was a problem hiding this comment.
Can't you use a public client for the web ui too? Keep GOTIFY_OIDC_CLIENTSECRET unset or set to an empty string. Then we don't need this workaround for Entra.
Author
There was a problem hiding this comment.
True, that works as well. The change took some iterations and had more workarounds added but they all proved to be unnecessary and this was the only part left. So, nevermind then, feel free to close this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add GOTIFY_OIDC_EXTERNALSECRET to allow omitting the client_secret from OIDC token exchange for the external (mobile app) flow.
This is required to get OIDC to work with Microsoft Entra that rejects requests containing a client_secret for mobile and desktop applications as they are marked as public client (gotify://oidc/callback).
The error I got when trying to use OIDC from the mobile app:
errors="Error #01: token exchange failed: oauth2: "invalid_client" "AADSTS700025: Client is public so neither 'client_assertion' nor 'client_secret' should be presented.In the browser, it worked fine. With this patch, OIDC works as expected for the mobile app as well.