Allow user name suffix for OAuth sources #3364

Open
opened 2025-11-02 05:10:13 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @mxmehl on GitHub (May 22, 2019).

Description

At our Gitea instance, we would like to introduce a second authentication source next to LDAP, namely Github. However, namespace-wise, we would like to give preference to our current and future LDAP users.

Can Gitea automatically add a suffix to a user name when this user registeres with a specific authentication provider, e.g. that the Github user janedoe becomes janedoe-guest or janedoe-github?

Debian's GitLab supports something like that for external users who are not Debian developers: https://signup.salsa.debian.org/register/guest/

Originally created by @mxmehl on GitHub (May 22, 2019). ## Description At our Gitea instance, we would like to introduce a second authentication source next to LDAP, namely Github. However, namespace-wise, we would like to give preference to our current and future LDAP users. Can Gitea automatically add a suffix to a user name when this user registeres with a specific authentication provider, e.g. that the Github user `janedoe` becomes `janedoe-guest` or `janedoe-github`? Debian's GitLab supports something like that for external users who are not Debian developers: https://signup.salsa.debian.org/register/guest/
GiteaMirror added the type/proposaltopic/authentication labels 2025-11-02 05:10:13 -06:00
Author
Owner

@6543 commented on GitHub (Aug 13, 2021):

should be handled around here: 3a6edd3685/routers/web/user/auth.go (L652)

after #16594 got in you have the LoginSource souce to check option against

@6543 commented on GitHub (Aug 13, 2021): should be handled around here: https://github.com/go-gitea/gitea/blob/3a6edd36851b266612f3d325bebc716fc60bfed5/routers/web/user/auth.go#L652 after #16594 got in you have the LoginSource souce to check option against
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3364