full-stack-fastapi-template icon indicating copy to clipboard operation
full-stack-fastapi-template copied to clipboard

[Bug] username/email field case sensitive

Open ghost opened this issue 5 years ago • 0 comments

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.

ghost avatar Jul 19 '20 18:07 ghost