You typed a code. It was refused. You typed another, then another, and somewhere around the fourth or fifth the screen stopped arguing about the code at all and said something like "too many attempts, try again later".

Now you are holding a phone that is still producing perfectly good six digit numbers, in front of a service that has stopped reading them. Nothing on the screen tells you how long "later" is, whether the next attempt will reset the timer, or whether this is the kind of wall that falls over by itself or the kind that needs a human being at the other end.

That is the real question behind "too many failed 2FA attempts", and almost nothing written about it answers it. The answer is that there are three different states wearing the same sentence, they last for wildly different lengths of time, and the thing you are most tempted to do next makes two of them worse.

The short answer

  • The counter is at the service, not in your app. A time based code is arithmetic: your authenticator computes it from a stored secret and the clock, offline, and it has no idea whether the last one was accepted. Every failed attempt is tallied on the other side of the wire.
  • That is why reinstalling does nothing. Removing the app, restoring from backup, re-syncing or scanning the setup QR again changes your copy of the secret and touches none of the service's counters. It can lose you the secret entirely.
  • There are three states, not one. A short automatic throttle measured in seconds or minutes, an account lock that stays until a successful sign-in or a human clears it, and an identity recovery queue measured in days. Only the first one ends by waiting.
  • Retrying inside the timer is the one guaranteed mistake. On several documented implementations the wait grows with each attempt, and on some the correct code is invalidated by the failures around it.
  • The usual cause is boring. A drifted device clock, the wrong one of two entries at the same provider, or a stale enrolment left over from an earlier setup. Fix that before you spend your remaining attempts.
  • KeyNesta cannot lift a service's lock. No authenticator app can. We hold no passkeys and no security keys either. What we can do is prove the codes themselves are right before you spend another attempt.

Why the pages ranking for this already miss it

Search the phrase and the first page is thin in a specific way.

Two of the three results are user to user support forum threads, one on Mozilla's support site and one on Apple Support Communities. Forum threads are written by people in the same position as the reader, which is why the retry advice in them is numbers somebody remembered rather than numbers a vendor published, and why two replies in the same thread can suggest different waits without either one being wrong or right. Apple's venue has a second problem built into the product: an Apple Account can be throttled for minutes or placed into account recovery for days, and the two feel identical from the outside, so a thread that mixes them leaves the reader unable to tell whether they are waiting for a timer or for a queue.

The third result, Okta's article on OTP verification attempt limitations, is real vendor documentation and the best of the three. It is also written for the administrator configuring the policy, not the person standing outside it, and Okta's own pages do not agree with each other. That article says a locked out Okta Identity Engine user is not locked out of the account and "may request another OTP immediately". The companion article on the same support site says the opposite about the authenticator itself: after five consecutive wrong codes "the user's authenticator will then be temporarily locked for 5 minutes, during which time they cannot use it". Both were updated within the last few weeks. A reader cannot act on that, which is a fair summary of the state of this question everywhere.

So here is the mechanism, the three states, and the numbers vendors actually publish.

The counter is at the service, and never in your app

This is the part that decides what is worth trying.

A time based code is a pure function of two things you already have: the shared secret stored when you enrolled, and the current time. Your app does not ask permission to produce one and it is not told whether the last one was accepted. There is nothing in it that counts failures, because there is nothing in it that knows about them.

The counting is specified as the server's job. RFC 4226, the standard underneath every one of these apps, puts it in a section called Throttling at the Server: "the authentication server needs to detect and stop brute force attacks", and "We RECOMMEND setting a throttling parameter T, which defines the maximum number of possible attempts for One-Time Password validation. The validation server manages individual counters per HOTP device in order to take note of any failed attempt." The counters are the validation server's, per enrolment, by design.

Diagram contrasting the phone's stateless code with the server's failed attempt counter
Everything on the left is arithmetic. Everything that counts, waits and refuses sits on the right, which is why nothing you do to the phone moves the number.

The standards built on top say the same thing in the language of requirements. NIST's digital identity guidelines require the verifier to "limit consecutive failed authentication attempts on a single account to no more than 100", and make it explicit whose bookkeeping this is: "The CSP or verifier SHALL maintain the information required for throttling authentication attempts."

Three practical consequences follow, and they are the reason this section exists:

  • Reinstalling the app, restoring a backup or re-adding the account clears nothing. The service never sees it. What it can do is destroy the only copy of a secret, which turns a fifteen minute wait into a recovery process.
  • The lock is often not attached to you at all. Nextcloud throttles by source IP address and documents that attempt records "expire after 48 hours". Microsoft Entra's smart lockout keeps "separate lockout counters" for familiar and unfamiliar locations. The same account can be walled off on one network and fine on another, which tells you nothing about your phone and everything about theirs.
  • Correct codes get caught in it. Okta documents that Identity Engine "allows users to enter an OTP up to five times. After that, the correct OTP is invalidated to prevent potential brute-force attacks." Authgear's optional setting does the same: "a valid OTP will become invalid after a user enters the wrong codes for the specified number of attempts." Being right is not enough once the count is spent.

Three states hide behind one message

The message is almost always the same shape. The state behind it is one of three, and they are not variations of each other.

Three columns comparing a short throttle, an account lock and a multi-day recovery queue
Only the first column ends by itself. The second needs an event and the third is a queue you join rather than a lock you clear.

State one, the automatic throttle. A short cooling off period, usually seconds to a few minutes, that expires with no help from anybody. GitLab's accounts with two factor authentication "unlock automatically after 10 minutes". Okta Identity Engine locks the authenticator "for 5 minutes". Nextcloud's "maximum delay is 25 seconds". This state is doing exactly what it looks like: making guessing slow. You get out of it by doing nothing for the stated time, which is the one case where waiting is the entire fix.

State two, the account lock. The service has stopped evaluating anything and will keep refusing until a specific event clears it, and the event is rarely time. Okta's Classic Engine is blunt about which event: "The only way to reset the MFA lockout counter is to successfully log in with MFA." Cal.com documents a lock that no amount of patience touches, where the user "cannot log in even with the correct password until an admin unlocks the account". GitLab offers the other common exit, which is to "wait for the end of the automatic unlock period or reset your password". If you are in state two and keep waiting, you will wait forever.

State three, the recovery queue. Not a lock at all. You have fallen off the authentication path entirely and joined a verification process with a queue in front of it. Apple is the household example and documents the shape honestly: account recovery "could take a while — several days or more". No code you type and no amount of waiting shortens it, because the thing being measured is not a timer, it is a review.

How to tell which one you are in, without guessing:

What you seeMost likely stateWhat to do
A message naming a time, or that disappears after a few minutesThrottleWait the stated time, then one attempt
The password is suddenly refused tooAccount lockStop. Use a documented unlock route or ask an administrator
The correct password still works and only the code failsThrottle on the factorWait, then fix the cause before the next attempt
You were sent to a form asking for identity details and given a dateRecovery queueLeave it alone and change nothing on your devices
A work or school account, and nothing clearsAccount lockThe administrator can clear it in seconds

What the services actually document

Very few publish a number. These do, and all of them count a wrong second factor code, not only a wrong password.

ServiceWhat the counter countsDocumented thresholdWhat clears it
GitLab.com, account with 2FAWrong password, wrong OTP at the 2FA challenge, wrong passkey10 or more failed attemptsAutomatic unlock after 10 minutes, or a password reset
GitLab.com, account without 2FAThe same events3 or more failed attempts in 24 hoursAutomatic unlock after 24 hours, or email verification
Okta Identity EngineWrong code from SMS, voice, OTP or Okta Verify5 consecutive wrong codes, returning HTTP 429The authenticator unlocks after 5 minutes
Okta Classic EngineThe same, within a five minute window5 consecutive failed MFA attemptsA successful MFA sign in, or an administrator
Cal.comWrong password, wrong 2FA code, wrong backup code10 consecutive failed attemptsA successful login resets the counter; once locked, an admin
Keycloak, default settingsPassword, OTP and recovery codes30 failures, then a wait that grows by 1 minute each timeUp to a 15 minute maximum wait; the count resets after 12 hours
Microsoft Entra ID, smart lockoutFailed sign ins, password side10 failed attempts by defaultOne minute at first, "longer in subsequent attempts"
Apple Account recoveryNot an attempt counter at allNo published thresholdA review Apple says takes "several days or more"

Two things to take from the table rather than the individual rows.

First, the spread is enormous: five attempts at one vendor, thirty at another, and auto unlock windows from twenty five seconds to twenty four hours. Any advice that names a single number for "how long a 2FA lockout lasts" is describing one product and presenting it as a rule.

Second, look at the right hand column. Only the GitLab, Okta Identity Engine and Keycloak rows end by themselves. The rest need an event, and three of them need another person. Microsoft states plainly why the escalation is unpublished: "we do not disclose the rate at which the lockout period increases after unsuccessful sign-in attempts." The vagueness on your screen is deliberate, and it is aimed at somebody else.

What makes it worse

Three habits, in rough order of how often they turn a short wait into a long one.

Three habits that extend a lockout, each with the documented cost it carries
Each one feels like progress and spends something that does not come back: the timer, the codes, or your ability to receive new ones.

Retrying inside the timer. On a throttle that grows, every attempt during the wait restarts or extends it. Keycloak's defaults add a minute each time a user passes the failure threshold, up to a fifteen minute ceiling, and it separately punishes attempts that arrive faster than one per second with a one minute lockout of their own. NIST describes the same design as normal practice, requiring the claimant to wait "for a period of time that increases as the account approaches its maximum allowance for consecutive failed attempts (e.g., 30 seconds up to an hour)". The cheapest thing you can do during a throttle is close the tab.

Spraying backup codes. This is the expensive one, because backup codes are single use and the counter does not care that they were. Cal.com's documentation lists "An incorrect backup code" alongside a wrong password as something that increments the lock counter. Keycloak's brute force protection applies "only to password, OTP and recovery codes", so a sheet worked through from the top is a sheet spent and a lock earned at the same time. If the codes themselves are being refused, 2FA backup code not working is the page for why, and reading it costs nothing.

Requesting fresh codes until the send limit trips. Texted and emailed codes have two separate ceilings: how many wrong ones you may submit, and how many may be sent to you. The second is usually tighter and recovers more slowly. Authgear documents a 60 second cooldown between sends by default, and a request made inside it does not arrive at all. Hammering the resend button while throttled can leave you unable to receive the code even after the attempt lock has expired.

And one that is specific to the recovery queue. If you have already been placed in Apple's account recovery, using your devices works against you. Apple's instructions are explicit: "turn off all your Apple devices during the account recovery wait", because "Activity from a signed-in device will cancel your request". Signing in somewhere else to check whether it is finished is enough to send you back to the start.

Why the codes were refused in the first place

The lock is a symptom. If you clear it without fixing the cause, you will spend your next allowance the same way.

A drifted device clock. The overwhelmingly common cause, and the easiest to rule out. The code is computed from the current time, so a phone whose clock is a minute slow produces arithmetically perfect codes that every service rejects. Set the date and time to automatic in the operating system, not in the app, which only reads the clock. Check your clock against ours takes a few seconds and answers it exactly, and 2FA code not working walks the full list of causes that survive a correct clock.

The wrong one of two entries at the same provider. If the same service appears twice in your app, one of them is almost certainly dead: an older enrolment that was replaced and never deleted. The labels frequently look identical. Codes from the retired entry are refused every time, and five of them in a row is exactly how an attempt allowance gets spent in under a minute.

A stale second enrolment from an earlier setup. Scanning a setup QR a second time, or re-adding an account during a phone move, can leave a secret that the service no longer recognises. The failure looks like a broken app. It is a broken pairing.

Before the next attempt, prove the app itself is producing correct codes: the test authenticator runs a published test credential in your browser and tells you whether your device and its clock agree with the standard. If that page is green and a service still refuses you, the problem is the entry or the lock, not the app.

What to do, in order

  1. Stop typing. Close the sign-in tab. Nothing good happens in the next sixty seconds.
  2. Name the state. Password also refused means an account lock. Only the code refused means a throttle on the factor. A form asking for identity details means a queue.
  3. Wait the stated time, or fifteen minutes if nothing is stated. One wait, undisturbed, beats five impatient ones.
  4. Fix the cause while you wait. Clock on automatic, duplicate entries identified, the test page green.
  5. Spend exactly one attempt. The best candidate code, read fresh with most of its window left, typed and not pasted from a stale clipboard.
  6. If it fails again, change route rather than repeating. A documented unlock path if the vendor publishes one, an administrator on a work account, and the provider's recovery form last, because that is the queue.
  7. When you are back in, remove the dead entries and put a current set of backup codes somewhere you can reach without this account. Where to store 2FA backup codes is the short version.

Where KeyNesta fits, and what it cannot do

What it cannot do, plainly. KeyNesta cannot lift a service's lock, shorten its timer, raise its attempt limit or see its counter. No authenticator app can, including the ones that imply otherwise, because the counter is on the other side of a wire they do not control. We also hold no passkeys and no security keys, so if the factor that failed was one of those, the route back is the provider's own.

What helps before the next attempt. The codes are generated on your device from your vault, so you can confirm what the app produces without spending anything at a service. Our clock handling is visible rather than hidden: the clock check and the test authenticator exist so that "is it my phone or is it them" stops being a guess. A tidy vault, with retired entries deleted, removes the duplicate entry trap entirely.

What we cannot do, ever. We cannot recover your vault passphrase, and sync is zero knowledge, so the server holds encrypted objects and no key that opens them. What our server stores is the full inventory. A Recovery Kit exists, and like every good precaution it has to be made before it is needed.

Frequently asked questions

How long does a "too many attempts" lock usually last?

There is no usual. Published windows run from twenty five seconds at Nextcloud through five minutes at Okta Identity Engine and ten minutes at GitLab to twenty four hours for a GitLab account without two factor authentication, and some locks never expire at all because they are cleared by an event rather than a clock. If the service names a time, trust that number. If it names none, treat fifteen minutes as a sensible single wait and then change tactics rather than repeating.

Does uninstalling and reinstalling my authenticator clear the lock?

No, and it is the most expensive thing on the list. The service keeps the counter, so a reinstall is invisible to it, while on your side you have just removed the working copy of your secrets. If the reinstall is not restored from a backup you have tested, a short wait becomes a recovery process at every account that app held.

Can I use a backup code to get past a lock?

Sometimes, and it is worth exactly one try rather than a sheet. Several services count a wrong backup code towards the same lock, and Cal.com's documentation lists it alongside a wrong password as an event that increments the counter. If one correct backup code is refused, the lock is on the account rather than the factor, and more codes will not change that.

Why will the service not tell me how long I have to wait?

Because the vagueness is a security feature aimed at an attacker rather than at you. Microsoft states that it does not disclose how fast its lockout period escalates for that reason. It is worth knowing that the guidelines disagree: NIST's own usability guidance asks verifiers to "inform users how long they have to wait until the next attempt to reduce confusion and frustration". Most services decline.

Does hitting the attempt limit mean somebody is attacking my account?

Usually not. The far more common explanation is the one in your own hands: a drifted clock, a retired entry sitting next to the live one, or a code read a second too late. Treat a sudden flood of codes you did not request differently, because that is a real signal, but a wall you walked into yourself after five tries is almost always self inflicted and harmless.

I am locked out and the service wants a code I cannot produce. What now?

That is the recovery queue, and it is a different task from this page. Work from whatever you still hold: a signed in session on another device, a backup code, a trusted phone number, a recovery contact. Lost phone 2FA recovery sets out the order, and the rule while you are in a queue is to change nothing, because activity on your devices can cancel a request that is already running.

Takeaway

The sentence on your screen describes three different situations and tells you which one you are in by saying nothing at all.

Work it out instead of guessing. If the password still works and only the code is refused, you are in a throttle and the fix is a quiet fifteen minutes. If the password is refused too, you are in an account lock and the fix is an event, not patience. If a form asked for identity details and gave you a date, you are in a queue and the only move left is to leave every device alone.

Then fix the thing that spent your attempts, because the lock is never the problem. The clock, the duplicate entry or the stale enrolment is the problem, and all three are checkable in less time than one wait.

And whatever the screen says, do not reinstall the app. The service is not watching your phone. It is watching its own counter, and that counter only ever moves for one reason: an attempt that succeeds.

Sources