Short answer
The short answer
TOTP stands for Time-based One-Time Password. It is the six-digit code an authenticator app shows, and it changes every 30 seconds. Your phone works it out from a secret key and the clock, so it needs no signal.
Short answer
TOTP stands for Time-based One-Time Password. It is the six-digit code an authenticator app shows, and it changes every 30 seconds. Your phone works it out from a secret key and the clock, so it needs no signal.
The name
How it works
RFC 6238 puts the shared part like this: “The prover and verifier MUST either share the same secret or the knowledge of a secret transformation to generate a shared secret.” It recommends a 30-second step: “We RECOMMEND a default time-step size of 30 seconds.” Codes are usually six digits; RFC 4226, which TOTP builds on, says implementations “MUST extract a 6-digit code at a minimum”, and some apps and services use eight.
You can watch one being made in our guide Watch a 2FA code being made.
No signal needed
Nothing is sent to your phone. The app already has the key and the phone already has a clock, so the code appears in airplane mode too. The website needs just the code you type.
The clock
The code is worked out from the time, so a clock that is wrong gives codes the website doesn’t expect. The RFC suggests a website allows at most one time step of delay (“We RECOMMEND that at most one time step is allowed as the network delay”), so a code from a clock that is well out of step is likely to be refused. If your codes are refused, check that your phone sets its date and time automatically.
Where you see it
Our guide Which apps and websites work with an authenticator app? shows where to find it, service by service.
Compared
Passkeys can’t be phished by a fake website the way a typed code can, so they’re worth using where a service offers them. An app code is a better choice than a text message. You can have more than one on the same account.
More: Why a code in an app beats a code by text message and Passkeys vs authenticator codes.
History
The Internet Engineering Task Force (IETF) published TOTP as RFC 6238 in May 2011. A draft of it was posted on 4 April 2008 (the IETF’s Datatracker lists draft-mraihi-totp-timebased-00 on that date). It builds on HOTP, which uses a counter instead of the time and was published as RFC 4226 in December 2005. RFC 6238 describes itself as informational: “published for informational purposes”.
Questions
Codes come from the time, so they may be refused. Set date and time to automatic, then try the next code.
For services that accept TOTP, yes: they work from the same key. GitHub’s help page says it is “app-agnostic when it comes to TOTP apps”. Not every service offers an authenticator app, so check its help page.
If your app has no backup, the codes on it go with it. Use a backup code the service gave you, then set the app up again. See our guides on backup codes and on what to do if you lose your phone.
Our app
MELKEM Authenticator makes TOTP codes on your iPhone, with no account and no cloud sync.
Sources
IETF: RFC 6238, TOTP: Time-Based One-Time Password Algorithm (opens in a new tab) and RFC 4226, HOTP: An HMAC-Based One-Time Password Algorithm (opens in a new tab). The draft date is from the IETF Datatracker history of RFC 6238 (opens in a new tab).
Canadian Centre for Cyber Security: Secure your accounts and devices with multi-factor authentication (ITSAP.30.030) (opens in a new tab), which lists an authenticator app as something you have and advises choosing options that do not rely on SMS where possible.
GitHub Docs: Configuring two-factor authentication (opens in a new tab). Google Account Help: Turn on 2-Step Verification (opens in a new tab).