Skip to content

Remove oauth scope and promt from theme - #1094

Merged
TheOneRing merged 1 commit into
mainfrom
work/theme_oauth
Sep 9, 2026
Merged

Remove oauth scope and promt from theme#1094
TheOneRing merged 1 commit into
mainfrom
work/theme_oauth

Conversation

@TheOneRing

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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() and openIdConnectPrompt() from Theme.
  • Added a default _scopes value directly in OAuth and stopped initializing scopes/prompt from Theme.
  • Adjusted well-known prompt filtering logic to use the existing _supportedPromtValues defaults.
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 thread src/libsync/theme.h
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
TheOneRing enabled auto-merge (rebase) September 9, 2026 10:56
@TheOneRing
TheOneRing disabled auto-merge September 9, 2026 11:21
@TheOneRing
TheOneRing merged commit b53d9e0 into main Sep 9, 2026
14 checks passed
@TheOneRing
TheOneRing deleted the work/theme_oauth branch September 9, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants