full-stack-fastapi-template
full-stack-fastapi-template copied to clipboard
[Bug] username/email field case sensitive
Out-of-the-box the username/email field is case sensitive. A single email could create many users by changing the capitalization.
i.e. [email protected] + [email protected]
I think the best way to handle this is to save the case-sensitive user/email when creating the user, and then when logging in or creating a new user, if there is already a case-insensitive matching user, it will log in to that one or, if creating a new account, reject the request to create a new user because the user already exists.