I’ve written a custom authenticator which auths users based on their email address and not their username. This has broken logins at /admin, as it apparently doesn’t allow an email to be used in the username field:

Is there a way I could get around this issue?
Here is the relevant
loginmethod from the admin app (unimportant detail elided):See how it tries to authenticate with the POST data fields of
usernameandpassword? Notice also, how they don’t use a django Form to do authentication? This is purely based on using the built inloginandauthenticatemethods of theauthcontrib app. This means there isn’t really an opportunity to change the form. Instead, you have to ensure that your custom authenticator is registered as an authentication backend.Since the built in admin login method only checks for the existence of an email address if the AUTH_BACKEND returns no user, it means you should be free to use the email address in the existing form. This should work, but if it doesn’t (and you’ve already set the Auth Backend), below is an alternative method.
So, what you could do, is override the admin login template, and post to your own custom login view which uses your own authenticator.
To override the default login page:
Next, you’ll want to strip out the existing form action, and point it to your own view:
I’m assuming you already have a view that does authentication, so post directly to that, and do a redirect on success to the main admin site.