
How to Share TOTP Codes Without Sharing the Secret
The practical ways to give teammates a working TOTP code while the secret stays in one place, and what each approach means for revoking access later.
The secret and the current time are the only inputs a TOTP code has, so you cannot compute one without the secret. The trick is not to share the secret differently, it is to stop each person’s device from needing it: something holds the secret and hands out codes on request. That distinction is the whole subject of how to share 2FA codes with your team securely; this article is about the mechanics.
Why the difference matters so much
A code is worth about thirty seconds. Sending one to a colleague is roughly as sensitive as reading out a parcel tracking number: by the time it leaks, it is already invalid, and it was only ever good for one login attempt.
A secret is worth everything the account is worth, for as long as 2FA stays configured. It is typically 16 to 32 characters, it is what the QR code contains, and copies of it are invisible: nothing in the account’s security page will ever tell you that four people scanned the setup screen in 2024.
That asymmetry is why “we share the codes” and “we shared the QR code once” are completely different security postures, even though both feel like sharing 2FA.
Three ways to hand out codes, not secrets
A shared vault that displays codes
The secret is entered once, by whoever administers the account, and stored encrypted. Teammates who have been given access open the entry and see the current code with its countdown. They never see the string behind it, and they cannot enrol their own app from it.
This is the general-purpose answer, and the one that survives people joining and leaving, because access is a list you edit rather than a secret you cannot recall.
In product terms this is a shared authenticator app: the vault holds the secret, the people hold nothing.
An API call from your own tooling
If the login is performed by a script, such as a nightly export, a CI job or a bot that posts to a client account, the code does not need to reach a human at all. Your tooling requests the current code at the moment it signs in, and the secret stays on the server side.
The rule of thumb: whatever credential your script uses to request the code must be as protected as the account itself, and scoped to the one account it needs.
Reading it out loud, deliberately
Someone with access reads the code to a colleague on a call. This is worth naming, because it is what most teams already do, and it is not wrong. It shares exactly the short-lived thing and nothing else.
Its limits are practical rather than cryptographic: it needs both people awake at the same time, it leaves no record of who signed in, and it makes one person the bottleneck for everyone else.
What you give up by sharing the secret instead
If the secret does go out, whether pasted in a channel, screenshotted or dropped into a shared note, three things become true at once, and stay true until 2FA is reset:
- You lose the count. There is no way to know how many devices hold it.
- You lose revocation. Removing someone from a channel does not remove the secret from their authenticator app.
- You lose the second factor’s independence. Anywhere the secret sits next to the password, an attacker who reaches that place has both factors.
None of this is theoretical, and none of it shows up in an audit of the account itself. It shows up months later, when someone who left the company still has a working code generator.
A short checklist
- The secret is entered once, in one place, by an account administrator.
- Everyone else has access to codes, granted per person and per account.
- Code views are logged, so “who signed in on Tuesday” has an answer.
- Recovery codes are stored with the secret, not distributed with it.
- Any secret that has been posted anywhere is treated as burned: reset 2FA on that account and re-enrol.
Frequently asked questions
Not on your own device, since the secret is the only input, along with the time. What you can do is let something else hold the secret and generate the code for you, which is what a shared vault or an API call does.
Yes. The QR code encodes an otpauth: URI containing the secret in plain text. Anyone who can see the image can enrol their own authenticator app permanently.
If people only ever saw codes, you remove their access and it is done. If they hold the secret, the only real revocation is resetting 2FA on the account itself and re-enrolling everyone who should keep access.
It has to be recoverable, which is not the same as shared. Keep it where the account administrators can reach it, along with the provider's recovery codes, and give everyone else access to the codes.
Read next · Sharing codes with a team
How to Share 2FA Codes With Your Team SecurelyGuide
Four ways teams share two-factor codes, what each one costs, and how to give people the codes they need without handing out the secret behind them.
Best Ways to Manage 2FA for Shared Accounts
Five ways to run two-factor authentication on a shared account, compared on setup effort, cost, remote work and offboarding.