How to disable 2FA

I restored a backup and upon logging in, it asks me for my 2FA code which I don’t have on my phone anymore. Any way to disable 2FA on my account?

Thank you

إعجاب واحد (1)

An admin will have to disable it for you.

إعجاب واحد (1)

I am the administrator. I understand you can do that sort of thing through the terminal but I don’t understand how.

Thank you

https://meta.discourse.org/t/admin-locked-out-of-2fa/92156/2?u=pfaffman

إعجابَين (2)

I followed that and I am getting this,

image

Thank you

إعجاب واحد (1)

Maybe @featheredtoast can advise. I meant get another admin to reset it for you. Are you the only admin, or something?

إعجاب واحد (1)

I am the only admin, I think. This is an old backup

إعجاب واحد (1)

Okay and I noticed a syntax error in my screenshot so I did it correctly, same issue,

image

إعجاب واحد (1)

Don’ t type the % symbol on every line. Ignore that and type the rest.

4 إعجابات

That works but now I am getting this for the last command,

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 إعجابات

That worked! Thank you very much

إعجابَين (2)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.