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

[Question] How to logout user after 2FA setup? #556

Open mzfr opened 2 years ago

mzfr commented 2 years ago

I want the user to log out immediately after they have set up the 2FA. And login again via the 2FA setup codes they have just setup.

Currently, once they have set up the 2fa code, they are redirected to the "account security page" and stay logged in.

How can I force them to logout once the 2fa setup is done?