In my user authentication I allow users to enter case insensitive email
. Recently I saw in the logs that one user can not authenticate himself. Reason is because his email
address has +
character inside, and for some reason MongoDB case insensitive search can not find email with special characters. It's like the special characters are ignored when performing the regex search.
I created this testing example: Mongo Playground
What is the reason of this behavior and how to solve this?