mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2026-03-13 07:49:55 +08:00
* Add unit tests to enforce email case insensitivity * Handle email as case insentitive while retrieving user in DB * Apply isort/black * Add migration doc
This commit is contained in:
10
docs/migration/2x_to_3x.md
Normal file
10
docs/migration/2x_to_3x.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# 2.x.x ➡️ 3.x.x
|
||||
|
||||
## Emails are now case-insensitive
|
||||
|
||||
Before 3.x.x, the local part (before the @) of the email address was case-sensitive. Therefore, `king.arthur@camelot.bt` and `King.Arthur@camelot.bt` were considered as **two different users**. This behaviour was a bit confusing and not consistent with 99% of web services out there.
|
||||
|
||||
After 3.x.x, users are fetched from the database with a case-insensitive email search. Bear in mind though that if the user registers with the email `King.Arthur@camelot.bt`, it will be stored exactly like this in the database (with casing) ; but he will be able to login as `king.arthur@camelot.bt`.
|
||||
|
||||
!!! danger
|
||||
It's super important then, before you upgrade to 3.x.x that you **check if there are several users with the same email with different cases** ; and that you **merge or delete those accounts**.
|
||||
Reference in New Issue
Block a user