Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sso): add custom extra scope support #7577

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

baobao1270
Copy link
Contributor

@baobao1270 baobao1270 commented Nov 28, 2024

This PR allows user set custom extra scope for SSO login.

Purpose

The purpose of this change is to give users more flexibility of username key (sso_oidc_username_key) based on ID token from OIDC server, for example, using email or username. Some OIDC implementations adds extra claims to ID token based what scope are passed to the server, so allowing users customize the scope is a must.

Implementation

This PR adds a new settings option, SSOExtraScopes (sso_extra_scopes). If the settings option is not empty, it will be appended to the default scopes ([openid profile]).

Front-end / i18n considerations

A new settings key, sso_extra_scopes would be added to front-end / i18n file. I have opened a related PR on front-end project: AlistGo/alist-web#203.

There are also small typo and styles fixes should be made, like Sso should be SSO, Ldap should be LDAP. Such changes are already conatined in the related PR. Please also kindly change translation on Crowdin for better looking.

@xhofe xhofe merged commit 088120d into AlistGo:main Dec 9, 2024
3 checks passed
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