You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How feasible would it be to support a custom user model? At least one thing that would have to be updated is that all references to user.username, for example:
Hi @ghedsouza, thanks for your question. I don't think it should be very hard to support custom user models. I think that django-otp (dependency) also supports custom user models, looking at the code. I think it would be a nice feature to add. Would you care to contribute this feature to this package?
How feasible would it be to support a custom user model? At least one thing that would have to be updated is that all references to user.username, for example:
https://github.com/Bouke/django-two-factor-auth/blob/d113b80c220bcf62b25d252d5980f02420c8c270/two_factor/views/core.py#L444
would have to be updated to use the USERNAME_FIELD (https://docs.djangoproject.com/en/dev/topics/auth/customizing/#django.contrib.auth.models.CustomUser.USERNAME_FIELD) setting on the user model (for cases where, for example, USERNAME_FIELD=email and there is no "username" attribute).
The text was updated successfully, but these errors were encountered: