Hi, I followed the example site and managed to get the "secret" page working with 2FA setup on my website.
However, to protect the admin site, I found this ReadTheDocs article, but it doesn't seem to work. Is this procedure still the current way to make 2FA work on the admin site ?
Using this, when I go to the admin site there is directly a username/password form (instead of asking to activate 2FA like in the "secret" page). And the login form doesn't work, it keeps re-showing the same form even if the credentials are correct.
This is my url config:
from two_factor.gateways.twilio.urls import urlpatterns as tf_twilio_urls
from two_factor.urls import urlpatterns as tf_urls
admin.site.__class__ = AdminSiteOTPRequired
admin.autodiscover()
urlpatterns = [
url(r'^secret/$', ExampleSecretView.as_view(), name="secret"),
url(r"^admin/", include(admin.site.urls)),
url(r'', include(tf_urls + tf_twilio_urls, "two_factor")),
]
Did I do something wrong ? Any help would be greatly appreciated, thanks !