amidaware / tacticalrmm

A remote monitoring & management tool, built with Django, Vue and Go.
https://docs.tacticalrmm.com
Other
2.92k stars 422 forks source link

Make users confirm their second factor before saving it #1870

Open sebvonhelsinki opened 1 month ago

sebvonhelsinki commented 1 month ago

Is your feature request related to a problem? Please describe. When setting up 2FA, the user sees the the TOTP setup QR code and confirms with a click on "FINISH". When the user clicks on "FINISH", TacticalRMM saves the TOTP base code, without verifying that the user actually has it set up successfully on their end. If the user, for any reason, was not able to set up 2FA successfully, they are now locked out of their account since TacticalRMM asks for 2FA confirmation on the next login.

Describe the solution you'd like After showing the user the TOTP secret code/QR code, before the user can confirm that they have set up MFA, the user should be required to enter the current TOTP code generated from the currently shown TOTP secret. Only after this confirmation should the 2FA settings for the user be updated.

To streamline this, the confirmation could look as follows:

Describe alternatives you've considered No alternatives have come to mind.

Additional context TacticalRMM is the first service I have encountered that activates 2FA without verifying that it actually works.