jazzband / django-two-factor-auth

Complete Two-Factor Authentication for Django providing the easiest integration into most Django projects.
MIT License
1.71k stars 448 forks source link

refactor: remove admin monkey patching #513

Open dopry opened 2 years ago

dopry commented 2 years ago

Description

BREAKING CHANGE: Sites will need to explicitly use TwoFactorAdminSite or extend the TwoFactorAdminSiteMixin

Motivation and Context

Monkey Patching the AdminSite isn't generally a good practice. We cannot know if users have custom admin sites that we may be breaking or are using other authentication modules that may impact admin login.

Screenshots (if appropriate):

Types of changes

Checklist: