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 Like

An admin will have to disable it for you.

1 Like

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 Likes

I followed that and I am getting this,

image

Thank you

1 Like

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

1 Like

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

1 Like

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

image

1 Like

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

4 Likes

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 Likes

That worked! Thank you very much

2 Likes

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