Google Authenticator code invalid? Why your phone’s clock matters
A code that was fine a minute ago can be rejected the next time you type it, and the app usually isn’t broken. These codes are calculated from the current time, so a small mismatch between your phone and the service is enough to make them fail.
Here’s why the clock matters, how much error a service tolerates, the other common reasons a code is rejected, and what to check before changing anything.
Why the clock decides whether a code is accepted
An authenticator app doesn’t receive the code from the service. It calculates it from a secret you shared during setup and the current time. According to the TOTP standard, IETF RFC 6238, time is divided into steps, with a recommended default of 30 seconds, and the app and the service must both know the current time and use the same step length. The service runs the same calculation when you submit a code, and the two results match only if both sides agree on which step it is.
That’s why a code can look perfectly valid and still be refused. If your phone’s clock says it is a different moment than the service does, the two calculations produce different numbers.
How much clock error a service tolerates
Services allow a little slack, because typing a code and sending it takes time. The standard recommends that a service accept at most one time step of delay, and that it set a limit on how many steps a device can be out of sync before it is rejected. A larger window also gives an attacker more time to use a stolen code, which is why the tolerance is kept small. Each service sets its own policy, so there is no single number to rely on.
The practical result is that a phone that sets its time automatically almost never causes trouble, while one set manually, or with a wrong time zone, can be minutes or even hours off and will fail consistently. Google’s own help page lists the device’s time being synced and correct for your local time zone among the first things to check.
Other common reasons a code is rejected
The clock isn’t the only cause. Google’s checklist also asks whether you entered the code before it expired, whether it’s the code for the right app or service, and whether it’s for the right account. People with several entries in the app often pick the wrong one, since many look alike.
Reusing a code is another cause. The standard says a service must not accept a code a second time after it has been successfully used, so a code that just worked will be refused if you try it again and you need to wait for the next one. A phone change can also be behind it: if an entry didn’t transfer, or the service has issued a new secret since, the old entry no longer produces matching codes.
What to check before changing anything
Start with the phone. Set the date, time, and time zone to automatic, wait for a fresh code, and enter it promptly. Older guides mention a time correction setting inside the app, but Google’s help page notes that setting is no longer available in version 7.0, so the phone’s own clock is the place to look.
Then confirm you’re using the right entry for the right account, and that you’re on the genuine site. Be careful about deleting an entry and adding it again as a first step. Removing it can erase your only copy of the secret, and if the codes aren’t synced, Google notes you may have to relink every site. Make sure you have backup codes or another way in before you try anything drastic.
WEEX Reminder: never share a code to fix a code
WEEX reminds users that when a code keeps failing, it’s tempting to accept help from anyone who offers, and that’s exactly when scams appear. Never send a one-time code, a QR code, or a setup key to anyone, including people who say they are from support, since a genuine service never needs them. Check the address of a site before entering a code, and keep backup codes offline. Nothing here is financial advice.
Conclusion
A rejected Google Authenticator code most often comes down to time: the app calculates it from the clock, and the service has to reach the same result. Setting the phone’s date, time, and time zone to automatic fixes most cases, and an expired code, the wrong entry, or a reused code explain much of the rest. Before deleting anything, make sure you have a way back in.
FAQ
1. Why is my Google Authenticator code invalid?
The most common causes are an expired code, the wrong app or account entry, or a phone whose date and time are out of sync. Check these first.
2. How accurate does my phone’s clock need to be?
Services accept only a small window. The standard recommends allowing at most one time step of delay, and each service sets its own policy, so the safest approach is to set the time automatically.
3. Does the time zone matter?
Google lists the device time being synced and correct for your local time zone among the first checks. Setting date, time, and time zone to automatic avoids manual mistakes.
4. Why was a code rejected the second time I used it?
The standard says a service must not accept a code again after it was successfully used. Wait for the next code and try that one.
5. Should I delete the account from the app and add it again?
Not as a first step. Removing an entry can erase your only copy of the setup secret, and re-adding it requires the service to issue a new one, so check the clock and the entry first and make sure you have backup codes.