Closed hjwp closed 8 years ago
No. Quoting the Django documentation: "This will usually be a username of some kind, but it can also be an email address, or any other unique identifier" ... allauth requires a clear distinction between true username fields and email fields.
Ah, I see. I use email as my username, so that's why I wanted it. Thanks for replying.
Conceptually, you do not have a username field. So, set ACCOUNT_USER_MODEL_USERNAME_FIELD
to None
I'd like to ask how can I set username as Keycloak ID, please.
Django custom user models require that you specify an attribute USERNAME_FIELD on your model, so could django-allauth just read this, rather than repeating the information in an additional settings.py entry?
https://docs.djangoproject.com/en/1.9/topics/auth/customizing/#django.contrib.auth.models.CustomUser.USERNAME_FIELD
http://django-allauth.readthedocs.org/en/latest/advanced.html?highlight=username%20field#custom-user-models