We have Angular/Ionic app.
One of the fields that we ask during registration is email.
Then we save the data to the User collection.
We also check if the email is already used. Example query:
firestore
.collection("User")
.where("email", "==", email)
.get()
The issue is that firebase is case-sensitive.
For example, testemail@gmail.com and TESTemail@gmail.com will be considered as two different emails.
We have not lowercase an email during registration previously so this case-sensitive behavior potentially can cause issues. Any advice on how we can lowercase email in a request and in DB when checking if an email already exists?