1

I have installed and configured this package https://github.com/Bouke/django-two-factor-auth for my Django app, to Admin site. Next step was to create a user and to setup this 2FA, but when i try to login for the first time, i'm always being redirected to /account/login/?next=/admin/

and i can't setup two-factor authentication. Has anyone faced with this problem?

EtherealNP
  • 101
  • 1
  • 1
  • 11
  • This is how I resolved the same problem: https://stackoverflow.com/a/56243363/457935 The two_factor code's `has_permission` override calls the default admin `has_permission` and adds in a call to check if an OTP has been received which it wont' have in the admin login. So the change redirects to the two_factor setup flow if an OTP isn't yet present. – saschwarz May 21 '19 at 17:16

0 Answers0