Admin locked out of 2FA


(Valery Baturin) #1

Hi all,

Suddenly I locked down myself with 2FA. I have a new phone, so Google Authenticator has been reseted. I’m the only one admin in forum and other moderators cannot disable 2FA for me, because they don’t have permissions for that.

Is there any console command or backdoor to disable it? I can manually add resources to GA, but I need a key and I don’t know where to find it.


(Sam Saffron) #2

I think nuking the records from the user second factors table will do the trick.

Try:

./launcher enter app
rails c
% id = User.find_by(username: "YOURUSERNAME").id
% UserSecondFactor.totp.destroy!

(Valery Baturin) #3

Thank you!

Worked like a charm.


(Jay Pfaffman) #4

I think I got this right: