Username should be able to be an email address (again) #8149

Closed
opened 2025-11-02 07:55:20 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @wolfaba on GitHub (Nov 22, 2021).

Feature Description

We would really like to use email address as username. Would this be possible?

I have already found https://github.com/go-gitea/gitea/issues/4030 but

  • we do have sAMAccountName as Firstname.Lastname, but for users with long name, there is not complete name. Email is for everyuser complete.
  • we have two different users with the same firstname and lastname, but in different domain, i.e. sAMAccountName is generated, but the email is still different
  • for most other service already use email address and we have startet to use email address instead of our uid because most external services use email address and we don't want from users to remember on which service they have to login with what account

Thank you for new consideration.

Regards,

Robert Wolf.

Screenshots

No response

Originally created by @wolfaba on GitHub (Nov 22, 2021). ### Feature Description We would really like to use email address as username. Would this be possible? I have already found https://github.com/go-gitea/gitea/issues/4030 but - we do have sAMAccountName as Firstname.Lastname, but for users with long name, there is not complete name. Email is for everyuser complete. - we have two different users with the same firstname and lastname, but in different domain, i.e. sAMAccountName is generated, but the email is still different - for most other service already use email address and we have startet to use email address instead of our uid because most external services use email address and we don't want from users to remember on which service they have to login with what account Thank you for new consideration. Regards, Robert Wolf. ### Screenshots _No response_
GiteaMirror added the type/proposaltype/enhancement labels 2025-11-02 07:55:20 -06:00
Author
Owner

@lunny commented on GitHub (Nov 22, 2021):

I think currently you could login with user's emails. If the login name is an email address, it may conflicts with login with emails.

@lunny commented on GitHub (Nov 22, 2021): I think currently you could login with user's emails. If the login name is an email address, it may conflicts with login with emails.
Author
Owner

@Gusted commented on GitHub (Nov 22, 2021):

it may conflicts with login with emails.

Related: https://github.com/go-gitea/gitea/issues/4030#issuecomment-914348794

@Gusted commented on GitHub (Nov 22, 2021): > it may conflicts with login with emails. Related: https://github.com/go-gitea/gitea/issues/4030#issuecomment-914348794
Author
Owner

@wolfaba commented on GitHub (Nov 22, 2021):

Hmmm, strange. We have tested this today morning and we got error Failed to login 'firstname.lastname@domain' via 'Actice Directory': User name is invalid [firstname.lastname@domain]: must be valid alpha or numeric or dash(-_) or dot characters, but probably there was some caching and we have not removed existing account after changing LDAP auth options.
Now, we can login with email using filter (mail=%s). The username attribute must be one without at-sign, we cannot user mail attribute, but we can use sAMAccountName.
Sorry for this question.

@wolfaba commented on GitHub (Nov 22, 2021): Hmmm, strange. We have tested this today morning and we got error `Failed to login 'firstname.lastname@domain' via 'Actice Directory': User name is invalid [firstname.lastname@domain]: must be valid alpha or numeric or dash(-_) or dot characters`, but probably there was some caching and we have not removed existing account after changing LDAP auth options. Now, we can login with email using filter `(mail=%s)`. The username attribute must be one without at-sign, we cannot user mail attribute, but we can use sAMAccountName. Sorry for this question.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8149