Enable storing special characters such as |, @ in username column to support userid(sub) or email option #9097

Closed
opened 2025-11-02 08:29:15 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @mohanraj1 on GitHub (Jun 21, 2022).

Feature Description

We are federating with multiple identity providers (IDPs). We use auth0 IDP which federates with multiple other IDPs.

We configured oauth2_client to use userid which is mapped to userid/sub attribute (https://docs.gitea.io/en-us/config-cheat-sheet/#oauth2-client-oauth2_client)
Auth0 provides "sub" attribute in this format "waad|". Example: waad|mUiNk3eeE-gtE_tyb

We can't change the sub field as we are federating with multiple other IDPs.

Based on the error log, it looks like user name only supports alpha numeric, dot(.), underscore( _) and dash(-) characters.
Can you please enable special characters such as pipe (|) in username column?

The other option is to use email. It looks like Gitea removes email domain and just stores username. Since we federate with many IDPs, using just username will cause collision. Can you please enable storing full email? May be we can add another option called "full-email" and store the full email address, and this would require storing "@" character in username column.

Do you see any issues in supporting special characters in username field?

Screenshots

No response

Originally created by @mohanraj1 on GitHub (Jun 21, 2022). ### Feature Description We are federating with multiple identity providers (IDPs). We use auth0 IDP which federates with multiple other IDPs. We configured oauth2_client to use userid which is mapped to userid/sub attribute (https://docs.gitea.io/en-us/config-cheat-sheet/#oauth2-client-oauth2_client) Auth0 provides "sub" attribute in this format "waad|<alpha numeric>". Example: waad|mUiNk3eeE-gtE_tyb We can't change the sub field as we are federating with multiple other IDPs. Based on the error log, it looks like user name only supports alpha numeric, dot(.), underscore( _) and dash(-) characters. Can you please enable special characters such as pipe (|) in username column? The other option is to use email. It looks like Gitea removes email domain and just stores username. Since we federate with many IDPs, using just username will cause collision. Can you please enable storing full email? May be we can add another option called "full-email" and store the full email address, and this would require storing "@" character in username column. Do you see any issues in supporting special characters in username field? ### Screenshots _No response_
GiteaMirror added the type/featuretype/proposal labels 2025-11-02 08:29:15 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Apr 26, 2023):

That's impossible for Gitea, a lot of code was written with the current username rule.

@wxiaoguang commented on GitHub (Apr 26, 2023): That's impossible for Gitea, a lot of code was written with the current username rule.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9097