Can't change username from non-local users #8369

Open
opened 2025-11-02 08:04:02 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @BaseCrusher on GitHub (Jan 17, 2022).

Gitea Version

1.15.8

Git Version

2.30.2

Operating System

Linux/Debian

How are you running Gitea?

Docker

Database

PostgreSQL

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Description

Using OIDC to authenticate users can't change their Gitea username.
Currently it seams to be intended but I don't see why a user should be able to change his username when logged in thruogh OIDC. In fact when registering through OIDC you have to put in a username. That means it is not connected to the OIDC username.

Is this really inteded?

Screenshots

No response

Originally created by @BaseCrusher on GitHub (Jan 17, 2022). ### Gitea Version 1.15.8 ### Git Version 2.30.2 ### Operating System Linux/Debian ### How are you running Gitea? Docker ### Database PostgreSQL ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Description Using OIDC to authenticate users can't change their Gitea username. Currently it seams to be intended but I don't see why a user should be able to change his username when logged in thruogh OIDC. In fact when registering through OIDC you have to put in a username. That means it is not connected to the OIDC username. Is this really inteded? ### Screenshots _No response_
Author
Owner

@silverwind commented on GitHub (Jan 18, 2022):

Same goes for LDAP users, but it's possible to work around by switching the user to local authentication first, save, rename, revert back to LDAP.

@silverwind commented on GitHub (Jan 18, 2022): Same goes for LDAP users, but it's possible to work around by switching the user to local authentication first, save, rename, revert back to LDAP.
Author
Owner

@BaseCrusher commented on GitHub (Jan 25, 2022):

I still do think, that a user should be able to rename himself wihtout switching the user to a local user before hand. And of course there are admins, who would like to have the username carry over from their external authenticator.

For that i would suggest to have an option which disable local names or something like that. So that if a users authenticates for the first time, the username field is disabled and they cannot rename themself in the account settings.

If this option is turned of, they are allowed to rename themself and can choose a username on first login.

What do you think?

@BaseCrusher commented on GitHub (Jan 25, 2022): I still do think, that a user should be able to rename himself wihtout switching the user to a local user before hand. And of course there are admins, who would like to have the username carry over from their external authenticator. For that i would suggest to have an option which disable local names or something like that. So that if a users authenticates for the first time, the username field is disabled and they cannot rename themself in the account settings. If this option is turned of, they are allowed to rename themself and can choose a username on first login. What do you think?
Author
Owner

@jakezhu9 commented on GitHub (Feb 14, 2025):

Hi, I’m encountering the same issue and I support the idea that users should be able to change their usernames without switching to local authentication. This would make the process more flexible and user-friendly.

Is there any update on this?

@jakezhu9 commented on GitHub (Feb 14, 2025): Hi, I’m encountering the same issue and I support the idea that users should be able to change their usernames without switching to local authentication. This would make the process more flexible and user-friendly. Is there any update on this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8369