pip install yeouia
- Add
AUTHENTICATION_BACKENDS = ['yeouia.backends.YummyEmailOrUsernameInsensitiveAuth']
to yoursettings.py
- Enjoy
Tested for
- Python 3.10, 3.11, 3.12
- Django 5+
May work otherwise, but you should run tests :P
Django's default auth username is not case insensitive. (See #2273 and #25617)
But… Who cares ?
This backend tries:
- username, case sensitive
- username, case insensitive
- email, case insensitive
And follows #20760.