Skip to content

Add ability to request additional scopes from Idp - #1

Open
nwinkelstraeter wants to merge 1 commit into
FSD-Christian-ADM:masterfrom
initOS:scopes-and-user-mapping
Open

Add ability to request additional scopes from Idp#1
nwinkelstraeter wants to merge 1 commit into
FSD-Christian-ADM:masterfrom
initOS:scopes-and-user-mapping

Conversation

@nwinkelstraeter

Copy link
Copy Markdown

First of all thank you for you work on this plugin. An OIDC for Mantis was definitely needed.

I tried to get this working with authentik but that does not transmit any username when only the openid scope is requested.
So I added an configuration option for requesting additional scopes (like profile or email).

Also I would like to match users by email rather than username, so I made that configurable as well.

I set the default values so that the current behavior should be left unchanged.

@FSD-Christian-ADM

Copy link
Copy Markdown
Owner

Hi,
sorry for the late reply. I will have a look at the pull request as soon as my workload allows it.
Thanks for contributing!

@sinalta

sinalta commented Mar 5, 2025

Copy link
Copy Markdown

We just got SSO integrated into Mantis via Authentik with the help of this PR.
No issues with it so far, but we only have a few active users.

Comment thread MantisOIDC.php Outdated
'redirect_uri' => '', # is set once the config page is saved
'oidc_scopes' => array('openid'),
'oidc_uid_claim' => 'name',
'oidc_find_usery_by' => 'name',

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

looks like a typo here

Suggested change
'oidc_find_usery_by' => 'name',
'oidc_find_user_by' => 'name',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you for finding this typo. FIXED

@FSD-Christian-ADM

Copy link
Copy Markdown
Owner

codewise this PR looks good. please fix the small typo and then I will try to test the addition soon!
thank you for adding a feature that makes sense and for an additional switch to compare information based on email or username!

@azoellner
azoellner force-pushed the scopes-and-user-mapping branch from cbf8e52 to dba0e92 Compare May 18, 2025 11:17
@azoellner

azoellner commented May 18, 2025

Copy link
Copy Markdown

Thank you for the review. I fixed the typo and rebased the feature branch to the current head of "master".

(Would it have been better to instead not rebase and just apply the suggestion?)

Add ability to choose whether to match users by name or by email
@azoellner
azoellner force-pushed the scopes-and-user-mapping branch from dba0e92 to 2476e0d Compare July 6, 2026 09:10
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.

4 participants