Auth0 Home Blog Docs

Creating a user converts email to lowercase

management-api
email
user

#1

I’m using

https://auth0.com/docs/api/management/v2#!/Users/post_users

to create new users, which is working fine, except that all of the emails are being converted to lowercase.

As I understand it the domain part of an email is case insensitive ie bob@domain.com could be bob@DOMAIN.COM

However the email name is case sensitive bob could be BoB so BoB@domain.com is valid.

Is there any way to stop the emails being converted to lowercase on creation?


#2

Your statements are aligned with what’s mentioned in the SMTP RFC in relation to the possibility of treating the mailbox local-part as case sensitive.

The local-part of a mailbox MUST BE treated as case sensitive. Therefore, SMTP implementations MUST take care to preserve the case of mailbox local-parts.

However, the same RFC goes on to add the following:

However, exploiting the case sensitivity of mailbox local-parts impedes interoperability and is discouraged.

As a personal opinion, this seems like a case where the fact that the specification allows us to do something does NOT mean we should do it. Choosing to treat the local-part of the email address as case-sensitive seems to be opening the door for a world of user experience problems. It would be as if your snail mail provider started to not deliver any letter that had your actual name in upper case.

From the Auth0 perspective, at this time, the full email address is generally treated as case insensitive; hence the behavior you’re experiencing. There’s no configuration currently available to change this behavior.


#3

Thanks for your feedback.


#4

Thanks for your feedback.


#5