'How to register a user whose email contains a capital letter in Firebase Authentication

I am using Firebase email and password authentication for user authentication in my app. One user's email contains uppercase letters, but when I add the user on the Firebase console, it creates a user with the email converted to lowercase. For example, adding a user with an email of [email protected] will create a user with an email of [email protected]. Is it possible to add a user with the email in uppercase (e.g. [email protected])?



Solution 1:[1]

when I add the user on the Firebase console, it creates a user with the email converted to lowercase

That's what the Firebase console does. It will always convert the capital letters in the email address into lowercase letters. Why? Because the email addresses are case-insensitive. What does it mean? It means that while authenticating, the uppercase and lowercase letters are interpreted as being the same. That being said, all letters are converted to lowercase letters.

Is it possible to add a user with the email in uppercase (e.g. [email protected])?

No, it's not possible to change that in the Firebase console. If you want to have the email addresses case insensitive, then you should store them either in Cloud Firestore or in the Realtime Database that way. But remember, while authenticating, the email address that is used is always lowercase.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ColdLogic