Independent Reporting · Not Legal or Security Advice · Verify With the Breached Company · Editorial Policy

How a TOTP Authenticator App Works, and Where It Still Falls Short

A TOTP authenticator is an app, or a small keychain token, that produces a fresh numeric code every half minute or so from two ingredients: a secret your account and your device agreed on once, and the current time. Because nothing is sent to your phone, the code keeps working with no signal and cannot be hijacked by moving your phone number to someone else’s SIM card.

That is why many people who are tired of waiting for a bank’s text message ask for “authenticator app” support. This guide explains what is happening inside those apps, what they protect against, and the one big attack they do not stop.

What TOTP stands for

TOTP is short for Time-based One-Time Password. The method is written down in RFC 6238, a 2011 specification published by the Internet Engineering Task Force, the body that maintains many of the internet’s core standards. Because it is an open standard, a general-purpose authenticator app is not tied to one company. Fidelity, for example, says: “We allow connections to most authenticator apps, including ones that are widely used, such as Google Authenticator, Microsoft Authenticator, and the Passwords app for iOS.”

The standard sets a time step, the window during which one code is valid. The authors write: “We RECOMMEND a default time-step size of 30 seconds.” Their reasoning is that “This default value of 30 seconds is selected as a balance between security and usability.” Shorter windows would frustrate slow typists; longer ones would give an eavesdropper more time to reuse a code.

How a TOTP authenticator builds each code

The process has two stages: a one-time setup and a calculation repeated every time step.

Setup. When you turn the feature on, the website shows a QR code or a string of letters. That string is a secret key. Your app stores it, and the site stores the same value. RFC 6238 puts the requirement plainly: “The prover and verifier MUST either share the same secret or the knowledge of a secret transformation to generate a shared secret.” In plain terms, your phone and the bank both hold a copy.

Every 30 seconds. Both sides take the current time, measured as “the number of seconds elapsed since midnight UTC of January 1, 1970,” divide it into time steps, and run the step number and the shared secret through a keyed hash function. The result is trimmed to six or eight digits. If your app and the server agree on the time and the secret, they arrive at the same number independently, and the code you type is accepted.

Clocks drift, so the standard also tells servers to tolerate a little slack. It recommends that “the validator be set with a specific limit to the number of time steps” by which a device may be off before its codes are refused. If your codes keep failing, the first thing to check is whether your phone is set to get its time automatically from the network.

Why it holds up when text messages fail

A text-message code travels over the phone network to whatever SIM card currently answers for your number. That creates two weak points the TOTP design avoids.

  • SIM swaps and port-outs. Once a fraudster talks the phone company into reassigning your line, texted codes start arriving on the criminal’s phone. A TOTP code is computed on your device and never travels anywhere, so a stolen number gains the thief nothing. The FBI’s Internet Crime Complaint Center, in a 2022 warning about SIM swapping, told the public to “Use strong multi-factor authentication methods such as biometrics, physical security tokens, or standalone authentication applications to access online accounts.”
  • No signal. On a plane, in a basement, abroad without roaming, or during a carrier outage, a text simply never shows up. An authenticator app needs no connection at all once it is set up. Schwab notes of its token-based login that it “will work anywhere you have access to the Internet,” meaning you need a connection to reach the website, not to receive the code.

We cover the wider case against texted codes in why SMS two-factor authentication is the weakest option.

Threat Text-message code TOTP authenticator
SIM swap or number port-out Codes go to the thief Not affected
No cell signal or carrier outage Code never arrives Works offline
Fake login page that relays codes live Vulnerable Vulnerable
Phone lost with no backup Recover via carrier Needs recovery codes or a call
Caller asks you to read the code Vulnerable Vulnerable

The gap: real-time phishing

An authenticator code is a secret you type. Anything you type can be typed into the wrong place. A phishing site that looks exactly like your bank can ask for your password and then your six-digit code, and forward both to the real bank within the same half minute. The code is valid, so the bank lets the attacker in.

The Cybersecurity and Infrastructure Security Agency (CISA) is blunt about this in its December 2024 mobile guidance: “While authenticator codes are better than SMS, they are still vulnerable to phishing.” The same document adds: “Only FIDO authentication is phishing-resistant.” FIDO is the standard behind passkeys and hardware security keys, which check the website’s real address before they respond, so a look-alike domain gets nothing. Some company help pages describe changing codes as resistant to phishing; CISA’s position is the more careful one, and the practical defense is to type codes only into an app or site you opened yourself.

A second form of the same trick happens by phone. Someone posing as your bank’s fraud team asks you to read out the code so they can confirm it is you. Fidelity’s help page answers that directly: “Never read back a security code unless you initiated a call to our official phone number.” That rule applies to every bank and every type of code.

Passkeys close this phishing hole; we explain how in passkey security and why banks still ask for a second step.

Hardware tokens use the same idea

Before phone apps, banks and brokers handed out keychain tokens that run the same kind of clock-plus-secret calculation on a dedicated chip. Some still do.

  • Schwab describes its code as “a 6 digit code that appears on your physical token or in the Symantec VIP app on your enrolled mobile device,” and states that “Each security code remains valid for 30 seconds.” Symantec VIP is a named service from a security vendor, and Schwab’s page describes enrolling that app or a physical token rather than any general-purpose authenticator.
  • Wells Fargo sells an RSA SecurID device for its Advanced Access checks. Its FAQ says “Every 60 seconds the device generates and displays a unique, random numeric passcode,” and that a new device carries “a one-time non-refundable charge of $25, which includes shipping and handling.”

CISA’s 2022 fact sheet groups these together, noting that token-based authenticators work “by generating OTP codes that the user enters to prove possession of the token.” A physical token has an advantage over an app: it is not on a phone that can be infected or lost along with everything else. Our guide to securing hardware authentication tokens covers storage and loss.

Setting up a TOTP authenticator without locking yourself out

Most lockouts happen months after setup, when a phone breaks or gets replaced. A few habits prevent them.

  1. Save the recovery codes. Many sites show a list of one-time backup codes when you enroll. Fidelity’s guidance: “Options vary across apps, but saving any recovery codes from your app in a secure place is suggested.” Keep the list on paper in a drawer, or inside a password manager; a screenshot on the same phone disappears with it.
  2. Move accounts before you wipe the old phone. Fidelity again: “When getting a new device, set up and connect your authenticator app before disposing of your old device.” Some apps can export accounts by QR code; others back up to a cloud account you control.
  3. Turn off text-message codes once the app works. CISA warns that “Enrollment in authenticator-based MFA does not automatically unenroll the account’s SMS,” and that the leftover text option “can create a weak, exploitable fallback mechanism that can be exploited by threat actors.” Where a site lets you remove the phone number as a sign-in method, do it. CISA also notes that “Some online services may default to SMS during account recovery flows,” so this is not always possible.
  4. Protect the app itself. Use a phone screen lock and, if the app offers one, a separate app lock. If you suspect someone has copied your secrets, follow our steps for an authenticator app that may be compromised.

Push approvals versus typed codes

Some banks skip codes and send a push notification to their own app instead: you tap Approve or Deny. A plain approve button can be abused by flooding you with prompts until you tap one by mistake. CISA’s fact sheet recommends that organizations unable to adopt phishing-resistant sign-in use “app- or token-based OTP or mobile push with number matching,” meaning the prompt only goes through once you enter, in the app, the number the sign-in page displays. If your bank’s push prompt shows details of the request, such as the device and location, read them before approving.

For a side-by-side look at specific apps, see our comparison of two-factor authentication apps.

Is a TOTP authenticator worth it if your bank does not offer one?

Many banks still offer only texts, calls, email, or their own app’s push prompt. You cannot force a bank to accept a third-party authenticator, but you can use one everywhere it is accepted, starting with your email account, since email is where password-reset links land. For a bank that only texts, the remaining defenses sit with your carrier: a carrier account PIN and a SIM or port-out lock make it far harder for anyone to redirect the number the bank is texting.

Frequently Asked Questions

Is a TOTP authenticator safer than text-message codes?

Yes, against SIM swaps, number port-outs and interception on the phone network, because the code is calculated on your device and never sent to it. Both methods can still be defeated by a fake website or a caller who talks you into handing over the code.

Do authenticator apps need internet or cell service?

No. After setup, the app only needs the shared secret and an accurate clock. It works in airplane mode and during carrier outages. You still need a connection to reach the site you are signing into.

What happens to my authenticator codes if I lose my phone?

The codes are lost with the phone unless your app backs them up or you saved the recovery codes each site gave you at setup. Without either, you will need to go through each company’s account recovery, which often means a phone call and identity checks.

Can I use Google Authenticator with any bank?

Only with banks that accept standard TOTP apps. Some institutions use their own app’s push prompts, a proprietary service such as Symantec VIP, or a branded hardware token instead. Check the security settings in your online banking profile.

Why does my authenticator code say it is invalid?

The most common cause is a phone clock that has drifted. Set your phone to use the network-provided time, then try a fresh code. If that fails, the account may have been re-enrolled on another device, which replaces the old secret.

Sources


This article is general consumer-security information, not legal or financial advice. Sign-in options, menus and fees change; confirm each setting on the official website or app of your bank, broker or wireless carrier before relying on it. Data Breach Radar is not affiliated with any bank, broker, carrier or app named here, and no company paid to be mentioned.

Owed money from a settlement? Check what is open at OpenClassActions.com. Caring for someone with dementia? Find practical guides at HelpDementia.com. Working out a skin routine? Evidence-based answers at AcneAdvocate.com. Forgot the name of a movie? Identify it at FindThisMovie.com.

We use cookies to run this site, measure how it’s used, and show ads. Choose “Essentials only” to limit cookies to what the site needs to work. Privacy Policy. Cookie Policy.