You type the six-digit code, press enter and see "invalid code". You try again with the next one. Same result. Many people assume the app is broken and rush to delete it, which can make things worse. In most cases the code itself is fine and a small mismatch is to blame.
This article follows a diagnostic flow. Start with the most likely and least disruptive causes, and move toward a full reset only if nothing else works.
Time-based codes depend on two things: a secret stored on your phone and the current time. If either side disagrees with the service, the code will not match.
Your phone combines the stored secret with the current time, usually in 30-second windows, to produce a short number. The service performs the same calculation on its side. When both results match, you are allowed in. Because the process uses the clock, a phone that is a minute off can produce numbers the service does not expect.
The phone's clock has drifted or is set manually.
The wrong entry was used for the account.
The code expired while you were typing.
The setup was changed on the service's side.
A new phone was set up without transferring the secret.
A code is valid for about 30 seconds. If you see it counting down, wait for the next one instead of racing the timer. Type slowly and check each digit.
Work through these actions one by one and test after each.
Turn on automatic date and time in your phone settings.
Confirm that the time zone is correct.
Restart the phone if the clock looks wrong.
On Android, some apps offer a time-correction option in their settings. Use it if it is available.
Make sure you are reading the code for the right account. If you have several similar names, such as two email accounts or a personal and a business login, tap the entry and verify the label. Rename entries to be clear.
Many services let you choose another method on the login screen. If you saved recovery codes, you can use one to get in and then reconfigure your authenticator.
If the clock is correct and the entry is right, the stored secret may no longer match the one the service expects.
You re-enrolled the account on another device, which replaced the earlier secret.
The service reset your two-factor settings after a security event.
The entry was imported incorrectly or partly lost during a transfer.
You restored an old backup that does not contain the newest accounts.
Sign in with a recovery code or another method, open the service's security settings and set up the authenticator again. Scan the new QR code, enter a fresh code to confirm and save any new recovery codes. Only then remove the old entry.
A complete authenticator app reset should be your last step, not your first. It removes entries from the app, so you need recovery access for every account before you begin. If you have it, a reset can clear a corrupted setup and give you a clean start.
Keep automatic time on at all times.
Label entries with the service and the account name.
Store recovery codes in a password manager.
Test your backup or transfer process once a year.
A well-maintained authenticator app with clear labels, biometric lock and encrypted backup reduces the odds of mismatched entries. Look for an app that lets you export or back up without exposing secrets.
For important accounts, such as email or banking, register a second device or key where the service allows it. On iPhone, a free authentication app can serve as a second home for codes if you enroll the account on both devices at the same time.
Some problems only appear in unusual setups, so they are easy to overlook.
Time-based codes use a universal clock, so changing time zones should not matter if your phone's automatic time is on. Problems arise when someone sets the time manually to match local time. After a trip, switch back to automatic settings and restart the phone.
Phones with custom system software, or devices that have been offline for a long time, can drift from the correct time. Connect to a network, let the clock update and try again.
If the same account was enrolled on two devices by scanning the same code, both should work. If one was set up from a different code, only the most recent secret may be valid. Check which device holds the current setup before assuming the app is broken.
Is the phone's time automatic?
Am I reading the correct entry?
Did I wait for a fresh code?
Do I have a recovery code or another method?
Have I changed devices or settings recently?
Keeping a simple note of recent changes, such as a new phone, a restored backup or an updated app, makes the cause of a failure much easier to find. When you contact a service's support team, this history helps them help you faster.
Fix the clock first, check the entry second and reset last. That order protects you from needless lockouts and keeps your accounts safe while you troubleshoot.