Skip to content

Add per-provider enrich with userinfo endpoint setting#1445

Merged
julien-nc merged 3 commits into
nextcloud:mainfrom
s3n-w6i:feat/per_provider_enrich_userinfo2
May 29, 2026
Merged

Add per-provider enrich with userinfo endpoint setting#1445
julien-nc merged 3 commits into
nextcloud:mainfrom
s3n-w6i:feat/per_provider_enrich_userinfo2

Conversation

@s3n-w6i
Copy link
Copy Markdown
Contributor

@s3n-w6i s3n-w6i commented May 22, 2026

What

This change introduces a checkbox into the provider settings that allows enabling the existing enrich_login_id_token_with_userinfo option on a per-provider basis.
To be backwards compatible, if the global enrich_login_id_token_with_userinfo is set to true, the userinfo endpoint is still fetched for all providers, regardless of their per-provider setting.

Why

  • It depends on the provider whether the userinfo endpoint needs to be fetched, so a per-provider setting better represents that.
  • For people with a hosted Nextcloud offering like myself, there may not be an option to set the global configuration option.

Open questions

  • I have tested it successfully using a Keycloak instance. Are integration tests required?
  • Regarding migration: This is a new option enrichLoginIdTokenWithUserinfo on the provider's settings object. This does not require any database schema changes, right?

Signed-off-by: s3n-w6i <37022952+s3n-w6i@users.noreply.github.com>
Copy link
Copy Markdown
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

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

Nice PR, thanks.

  • Backward compatibility 👍
  • No migration needed 👍 because the value is stored in app config as a new row with the key provider-N-enrichLoginIdTokenWithUserinfo for each provider

Comment thread l10n/en_GB.json
Signed-off-by: s3n-w6i <37022952+s3n-w6i@users.noreply.github.com>
@julien-nc julien-nc self-requested a review May 29, 2026 10:05
testGetProvidersWithSettings: Since all boolean options are set to true by default, also set enrichLoginIdTokenWithUserinfo to true

testSetSettings: Add missing enrichLoginIdTokenWithUserinfo field

Signed-off-by: s3n-w6i <37022952+s3n-w6i@users.noreply.github.com>
@julien-nc julien-nc merged commit 7294acf into nextcloud:main May 29, 2026
51 checks passed
@s3n-w6i s3n-w6i deleted the feat/per_provider_enrich_userinfo2 branch May 29, 2026 11:59
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