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.