How to disable 2FA

The alias changed since we have multiple totps now. Also that command would remove all totp instances across all users… You probably want to do the following as the second command:

UserSecondFactor.totps.where(user_id: id).each(&:destroy!)

5 Likes