Two factor auth failing, even on setup #22013
-
My two factor auth codes suddenly failed early last week, i didn’t have my recovery codes so I started the account recovery process. Now I’m trying to set up two factor auth again, and it is still failing, even on setup (when I scan the QR code on an app and enter the codes into github, it says “Two-factor code verification failed. Please try again.”) Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 26 comments 22 replies
-
Resolved! according to this thread, in my authenticator app, under ‘settings’ I tapped ‘Time Correction for Codes’ → ‘Sync now’ and that worked like a charm |
Beta Was this translation helpful? Give feedback.
-
👋 Welcome! You haven’t mentioned which app you are using, but one of the reasons we sometimes see failures to set up TOTP is if the device you’re using has the time set manually, and is out of sync with the server. That can cause it to create incorrect codes. |
Beta Was this translation helpful? Give feedback.
-
Oh! That’s great! Thanks for updating :slight_smile: |
Beta Was this translation helpful? Give feedback.
-
LOL yeah initially i was using google authenticator. though, i installed lastpass authenticator just to see if a different app would change things, and it still failed. it’s surprising to me that I would need to time sync immediately. after installing |
Beta Was this translation helpful? Give feedback.
-
It’s the only real problem I’ve heard of these apps having, and that’s a good thing! |
Beta Was this translation helpful? Give feedback.
-
I am using Microsoft authenticator and it is failing. There is no Time Sync option under Settings, Both my laptop and my samsung android phone are syncing time automatically |
Beta Was this translation helpful? Give feedback.
-
I use Google Authenticator, which is in sync with Google time servers, and it still fails. I always have to use the recovery codes. The solution doesn't work, as the app reports that it is in sync. |
Beta Was this translation helpful? Give feedback.
-
There is also no Time Sync option under Settings in my keepassXC |
Beta Was this translation helpful? Give feedback.
-
Experienced the same problem randomly , changed phones , from android to ios and everything seemed to be working just fine with the Authenticator app , yesterday and today , couldnt accept my code , everything seemed to be on sync , so I opened my old phone and used that code and worked like a charm. not sure why though and passed the 2FA on the privacyIDEA Authenticator if I will have better luck. For now though I disabled it. |
Beta Was this translation helpful? Give feedback.
-
I use Microsoft Authenticator and had the same issue. To solve this, I went to my mobile setting and set the date and time to automatic. |
Beta Was this translation helpful? Give feedback.
-
I use Authy. Same issue. No Time Sync option. |
Beta Was this translation helpful? Give feedback.
-
I use Microsoft Authenticator and had the same issue. To solve this, I went to my mobile setting and set the date and time to automatic. |
Beta Was this translation helpful? Give feedback.
-
I'm using Microsoft Authenticator. Neither of them work. I get the message "Two-factor authentication failed." I've tried signing into Github using 2FA on both my laptop and my phone. Both of which have the time and date set to the same as the MS Authenticator app. Is there anything else I can try? I use MS Authenticator for quite a few things, and only Github has this issue. |
Beta Was this translation helpful? Give feedback.
-
the same problem here |
Beta Was this translation helpful? Give feedback.
-
I had the same problem, but the difference was that I had multiple devices set up. Only the last device's authorization code is correct. For example, I first added the configuration for Microsoft's Authoenticator, and then added the configuration in the Chrome authentication plug-in. Only the configuration in Chrome worked. Finally, I added the authorized ID in chrome to Microsoft Authoenticator, so that the authorization codes of the two terminals are consistent. |
Beta Was this translation helpful? Give feedback.
-
Same problem. I'm using Microsoft authenticator and I've checked the time settings of my phone and computer, they are all correct. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
The same problem occurred. There were no issues before, even though I installed Microsoft and Google authenticator apps on a new Android phone a month ago. But it didn't work yesterday, I adjusted the time but it didn't help. However, when I tried the old phone's Microsoft authenticator app, it surprisingly worked. Do I have to use the old phone for authentication? Is this reasonable? |
Beta Was this translation helpful? Give feedback.
-
As suggested by @muneib, to solve this I had to go to my phone Date & Time settings, set time to manual, set again to automatic, remove the Github entry in my authenticator app. Then I added Github again with the QA code, and it finally worked ! :D |
Beta Was this translation helpful? Give feedback.
-
I've solved this problem. |
Beta Was this translation helpful? Give feedback.
-
I met the same problem in Microsoft Authenticator, remove and re-add account solved the problem. I guess only one auth app (the last configured one) can be used for github 2FA, so if you add configure the 2fa in 2 apps (for me they are twilio authy and microsoft authenticator), one of them will be invalid. |
Beta Was this translation helpful? Give feedback.
-
The same issue, attempt to setup 2FA fails, because it shows "Two-factor code verification failed. Please try again." just on the first attempt after barcode scan with Google Authenticator app. Is 2FA broken on github? The only way to login into github now is to use recovery codes. 2FA don't works at all - it reject valid 2FA codes. Update: fixed. The root of cause - incorrect time zone setting on smartphone. It showed correct local time, but it seems that app using UTC time which is incorrect in that case. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I'm trying to setup Google Authenticator on an Android Phone because I'm getting the scary "permanent account lockout" message. Authenticator ate the 2-D barcode just fine, but any "code from the app" I enter does work and gives the message "Two-factor code verification failed. Please try again." This persists after using the "Sync now" option for time codes in the app. (And that gets "Time already correct" from the phone app, anyway.) How can I set up 2FA and avoid having my account permanently locked? |
Beta Was this translation helpful? Give feedback.
-
For those who has issue with Google Authenticator. Make sure you have proper time zone and proper time on the phone. Often the issue is due to wrong time zone in system settings. |
Beta Was this translation helpful? Give feedback.
-
New phone here and I encountered the same problem. |
Beta Was this translation helpful? Give feedback.
Resolved! according to this thread, in my authenticator app, under ‘settings’ I tapped ‘Time Correction for Codes’ → ‘Sync now’ and that worked like a charm