Why are email addresses for user authentication case sensitive?

https://docs.mongodb.com/realm/authentication/email-password

Wondering why email addresses would be case sensitive as pointed out in the top “Note”. Considering emails addresses are not normally case sensitive, why would MongoDB have set this up this way?

1 Like

Hi @Anthony_CJ,

I believe this comes from the implementation of this data being stored in a MongoDB store where by default values you search on are case sensitive.

What I would recommend is when a user registraters turn the email to lower case via the app and so on every login. This way any case during login will work (aka case insensitive).

Thanks
Pavel

Absolutely. Have done that. Just thought it was odd as it allows for errors and duplicated email addresses (where case is ignored). Thanks for the response.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.