Oops, I lost my phone. How can I OTP now?

Search “disable 2fa” first result says

So:

./launcher enter app
rails c
id = User.find_by(username: "YOURUSERNAME").id
UserSecondFactor.totps.where(user_id: id).each(&:destroy!)
9 Likes