def authenticate(self, username=None, password=None, **kwargs):
        if username is not None:
            username = username.lower()

        return super(CaseInsensitiveUsernameFieldBackendMixin, self).authenticate(
            username=username,
            password=password,
            **kwargs
        )
This authentication backend assumes that usernames are email addresses and simply
dataset/ETHPy150Open fusionbox/django-authtools/authtools/backends.py/CaseInsensitiveUsernameFieldBackendMixin.authenticate