Remove oauth scope and promt from theme - #1094
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
It introduces an exported interface break (removed virtuals in Theme) and leaves at least one now-stale in-code comment referencing the removed API.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR removes OpenID Connect scope/prompt customization from the Theme interface and makes OAuth use built-in defaults instead, simplifying theme responsibilities and centralizing OIDC parameters in the credentials layer.
Changes:
- Removed
openIdConnectScopes()andopenIdConnectPrompt()fromTheme. - Added a default
_scopesvalue directly inOAuthand stopped initializing scopes/prompt fromTheme. - Adjusted well-known prompt filtering logic to use the existing
_supportedPromtValuesdefaults.
File summaries
| File | Description |
|---|---|
| src/libsync/theme.h | Removes OIDC scope/prompt virtuals from the exported theme API. |
| src/libsync/theme.cpp | Drops the default implementations of the removed theme methods. |
| src/libsync/creds/oauth.h | Sets a default OIDC scope string on the OAuth object itself. |
| src/libsync/creds/oauth.cpp | Removes theme-derived scope/prompt initialization and updates prompt filtering logic. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
218
to
222
| * List of ports to use for the local redirect server | ||
| */ | ||
| virtual QVector<quint16> oauthPorts() const; | ||
|
|
||
| /** | ||
| * Returns the required opeidconnect scopes | ||
| */ | ||
| virtual QString openIdConnectScopes() const; | ||
|
|
||
| /** | ||
| * Returns the openidconnect promt type | ||
| * It is supposed to be "consent select_account". | ||
| * For Konnect it currently needs to be select_account, | ||
| * which is the current default. | ||
| */ | ||
| virtual QString openIdConnectPrompt() const; | ||
|
|
||
| /** |
Comment on lines
668
to
+670
| const auto flag = Utility::stringToEnum<PromptValuesSupported>(x.toString()); | ||
| // only use flags present in Theme::instance()->openIdConnectPrompt() | ||
| if (flag & defaultOauthPromtValue()) | ||
| if (flag & defaultOauthPromtValue) |
TheOneRing
force-pushed
the
work/theme_oauth
branch
from
September 9, 2026 10:55
96f3ce4 to
8cfd277
Compare
TheOneRing
enabled auto-merge (rebase)
September 9, 2026 10:56
TheOneRing
disabled auto-merge
September 9, 2026 11:21
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.
No description provided.