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

OIDC auth: Allow the source field of username to be configurable instead of fixed to sub #21518

Closed
NexZhu opened this issue Oct 20, 2022 · 2 comments · Fixed by #30454
Closed
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@NexZhu
Copy link

NexZhu commented Oct 20, 2022

Feature Description

Currently in OIDC auth, Gitea get username from sub field returned from OIDC provider, which is often UUID. This should be configurable, for example to use preferred_username instead of sub.

Screenshots

image

@NexZhu NexZhu added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Oct 20, 2022
@NexZhu
Copy link
Author

NexZhu commented Mar 21, 2023

Will this feature request be considered?

@helmut72
Copy link

helmut72 commented Feb 9, 2024

I use a mapper in Keycloak to send content of preferred_username in sub field.

Gitea also doesn't support name field. Keycloak send full name in this field to Gitea, but it's empty in Gitea.

lunny pushed a commit that referenced this issue Apr 16, 2024
This PR adds the preferred_username claim as a possible username source
for the oauth2_client.

Closes #21518
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants