Opportunity

OTP rate limiting across SMS and email channels

The PainHunt Team· Published · Updated · 2 min read

TL;DR: Test an OTP flow at the point where a user switches channels while a code is delayed. A shared account-level abuse policy, deterministic state transitions and a safe recovery path could reduce avoidable lockouts. That is a design hypothesis; public complaints do not establish the size of a paying developer market.

Separate the security budget from delivery state

NIST's authentication guidance addresses failed-attempt limits and replay resistance. It does not make SMS, email and authenticator-app methods interchangeable. The required assurance and the action being protected need to be defined first.

A useful investigation follows one attempt through issuance, delivery reporting, entry and verification. A late code and an incorrect code should not be collapsed into the same unexplained failure. Equally, a delivery problem must not justify unlimited guesses or a fallback that bypasses the intended security controls.

The orchestration layer to prototype

  • Model an identity's allowed verification attempts and the method-specific rules explicitly. Test whether switching channels accidentally resets a policy that was meant to apply to the account.
  • Make resend and duplicate submission idempotent where appropriate. Define which outstanding codes remain valid and what happens when two tabs race, rather than assuming every flow needs exactly one live code.
  • Distinguish provider acceptance from delivered or verified outcomes, retaining only the identifiers and telemetry needed for diagnosis. Do not put OTP values in analytics logs.
  • Define recovery and reviewer overrides with an audit trail. A support action should have an authorization policy, not become an undocumented bypass.

A channel adapter should also respect the upstream provider's retry guidance. Automatically sending the same request again is not a remedy for a counter or state-machine defect.

A pilot that reveals the difficult cases

Replay controlled delayed, duplicated and out-of-order deliveries, channel changes, expired codes and concurrent submissions in a nonproduction test environment. Have security and product reviewers agree which outcomes are acceptable before scoring the implementation.

Then compare it with the current identity provider and the team's own code. Measure avoidable lockouts, support investigation time and added friction. Do not infer a global decline in carrier reliability or willingness to pay from this exercise. Pricing per verified identity is one commercial option to test, not an established answer.

Risks specific to authentication

One shared counter can itself enable denial of service if attackers can exhaust another person's attempts. Recovery can weaken the protected action. Phone-number collection and delivery telemetry also create privacy and retention work. A narrow test harness may be useful even if a team does not want another service on its sign-in path.

Related: account recovery and JWT key-selection boundaries.

Frequently asked questions

Why look across channels?

Separate limits can leave the intended account-level policy unenforced when a person switches methods. The design must account for each authenticator’s requirements, delivery costs and recovery policy rather than use one counter for every situation.

Does a sent code mean the user received it?

No. Sending, provider acceptance, reported delivery and successful verification are different events. Delivery evidence may be incomplete, so the workflow should not label a missing code as a confirmed user mistake.

Is email equivalent to an authenticator-app OTP?

No. Their trust and protocol properties differ. A proposed orchestration layer should preserve the requirements of each method and the assurance level needed for the action, not make fallback silently weaker.

Research the problem behind your idea

Explore problem summaries and source links to compare workflows and decide what to investigate next.

Open the Pain Point Browser

Related articles