HELP 2FA did not display QR code to scan now I am locked out!

Hello,

Great to see 2FA has been added to CP.

On my local server I enabled 2FA and was presented with the QR code to scan, I scanned it with my android and it worked perfectly.

I went to repeat the same process on my DO server however this time after enabling 2FA I was not presented with the QR code to scan and I am now locked out and can not access the panel. I now realize that I probably shouldn’t have hit save without scanning any QR code :blush:

Is there any way I can disable 2FA via the command line please or any other method?

Any help would be much appreciated.

HOW to Disable 2FA Via Command ?

For anyone else who can not sign into Cyberpanel using 2fa, i.e, Cyberpanel returning incorrect 2fa code response upon attempting to login, please check your system time.

timedatectl

I found my server was 3 minutes out of sync, therefore you would have to wait 3 minutes before putting the stale/ expired 2fa code in. Correcting and updating the time or ntp servers fixes this.

I hope this helps someone.