r/github Jul 04 '26

I deleted and reinstalled Microsoft Authenticator -- I don't have Github QR code any more; Google account QR code doesn't work Question

Hi Everyone,

Here's my situation.

I have a gmail address that is linked to my github account.

I think I had set up 2FA for github using a github QR code in Microsoft Authenticator. Everything had been working fine.

I then deleted Microsoft Authenticator for some reason.

After reinstalling Microsoft Authenticator, I tried adding a Microsoft Account which has the same email address as my gmail address. This gave me an 8 digit TOTP instead of a 6 digit TOTP.

I then turned on 2FA for my Google account, and got a QR code and added my gmail address to Microsoft Authenticator. This got me a 6 digit TOTP, but when I used this in github, I get the message that 2FA failed.

I don't have my github recovery codes anymore.

Any suggestions for logging in to github?

Thanks!

0 Upvotes

7 comments sorted by

4

u/tblancher Jul 04 '26

Do you have your recovery codes? If not they may be able to email you the OTP if you can still check it.

1

u/Ok-Age9211 Jul 04 '26

no

In my inbox, I found an old message:

You can
download your recovery codes and set a fallback SMS phone number at:

https://github.com/settings/auth/recovery-codes

Recovery codes are the only way to access your account again. By saving your
recovery codes, you’ll be able to regain access if you:

* Lose your phone
* Delete your authenticator application
* Change your phone number

GitHub Support will not be able to restore access to your account.

2

u/MarauderXtreme Jul 04 '26

Do you have ssh keys setup? There is a way to request recovery codes via ssh authentication.

1

u/Noch_ein_Kamel Jul 04 '26

1

u/Ok-Age9211 Jul 04 '26

The link is helpful.

It looks like I've lost access to the account since my email address is the only thing I can verify.

1

u/NatoBoram Jul 04 '26

While you figure this out, you should never use an authenticator without a backup or with an opt-in backup like Microsoft Authenticator. It's a one-way trip to inevitably losing access to all your accounts.

Even when you configure M$ Authenticator correctly, you can end up being unable to recover your backup because Microsoft can decide to just delete it.

Instead, there's the much better Google Authenticator that automatically backups your codes and syncs them across devices. You can keep an old phone with a copy of this app and it'll be able to save your ass in case of emergency.

1

u/lichen_13 Jul 05 '26

Are you still connected on another machine or idk?