Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cosmos-DB compatability (#25) Azure Cosmos DB for MongoDB neither supports creating unique index on non-empty collections nor collation, which leads to exceptions in fastapi-users. Introduce a setting COSMOSDB_COMPAT which, when set, replaces MongoDBUserDatabase with a subclass with the incompatible function calls patched out: only set indexes if they do not exist on the collection (so they are set only once, before documents are inserted) do not use collation when storing/querying the email field Skipping the collation means that email addressess (usernames) are not case-insensitive anymore - i.e. my@user.de and My@user.de are treated as different accounts.
- Loading branch information