A code arrived that you did not ask for. Six digits by text from a service you recognise, or a push notification on your phone asking you to approve a sign-in you are not making. You were not logging in to anything. Nobody is using your laptop.

Here is the thirty-second version: that message is not proof that you have lost anything, and it is also not nothing. Which of those it is depends on which of four quite different events produced it, and you can tell them apart right now, from evidence you are already holding. The message on your screen contains almost all of it.

Nearly every page answering this question gives you two instructions: never share the code, and change your password. Both are correct. Neither is sufficient. "Never share it" is advice about a scam that has not happened to you yet. "Change your password" leaves the single most important step undone, because on several services a session that is already signed in survives a password change, and the attacker does not need to log in again.

So this page does three things the pages currently ranking do not. It separates the four causes using what is on your screen. It gives you the next ten minutes in order, including the step that has to come after the password change. And it names the exact place each of six major services keeps its sign-in history, because "check the service's security page" is worthless advice when you are the one standing in front of it looking for it.

The short answer

  1. Do not type the code anywhere, do not approve the prompt, and do not read it out to anyone who calls or messages you. A code is the one thing nobody legitimate will ever ask you for.
  2. Read the message first. One code or a burst of prompts? Text or push? Your account or somebody else's? Sent by a service, or by your mobile carrier? Those four questions sort the whole thing.
  3. A push prompt you did not trigger is the serious one. It means someone already has a working password for that account. A single texted code usually means someone is trying one.
  4. Change the password for that account, using a password that is not a variant of the old one and is not reused anywhere else.
  5. Then revoke every signed-in session, in that order, from the account's own device or session list. This is the step everyone skips, and skipping it can leave the intruder exactly where they were.
  6. Read the sign-in history for that account and the mailbox behind it. Paths for the six services most people need are in the table below.
  7. Move that account off texted codes and onto an authenticator app, which cannot receive any of these messages because it receives nothing at all.

If you only have two minutes, do steps 4, 5 and 7 on the account the message named, and come back for the rest.

What the message actually proves

This is where the ranking pages are thinnest, and it is the part that decides how worried to be.

A verification code sent to you proves that somebody reached the step where the service wanted to confirm it was you. On most services that is the second step, which means they got past the first one and your password is in somebody's hands. On a few, a code is sent at sign-up or at password reset before any password is checked, which means it proves nothing about your password at all. You cannot tell which from the code, but you can tell from the wording: a message that says "your sign-in code" sits behind a password; one that says "verify your email" or "reset your password" does not.

A push prompt you did not trigger is different, and worse. Push prompts are only generated after a correct password. CISA says it plainly in the fact sheet it published on the problem: "Cyber threat actors who have obtained a user's password know they can enter it into an identity platform that uses mobile push-notification-based MFA to generate hundreds of prompts on the user's device over a short period of time" (CISA, Implementing Number Matching in MFA Applications). One unexplained push prompt is an alarm. A burst of them is the technique CISA names MFA fatigue, "also known as 'push bombing'", which "occurs when a cyber threat actor bombards a user with mobile application push notifications until the user either approves the request by accident or out of annoyance with the nonstop notifications".

So the ranking is simple, and it is the opposite of what the volume of messages suggests. A single texted code is the mildest version. A push prompt, even one, means the password is already gone.

Four causes, and the evidence that separates them

One message fanning out into four branches that end in four different causes
Which branch you are on is decided by the sender and the count, never by the digits themselves.

Work down this table with the message still on your screen. It takes about a minute and it decides everything that follows.

What you are looking atWhat it probably isHow worried to be
One texted code, for an account you own, no repeatSomeone is trying your password on that accountChange the password tonight
A burst of codes or push prompts in minutesPush bombing: your password already worksAct now, in the order below
A code or verification mail naming an account that is not yoursSomebody mistyped their own address or numberNothing to do, do not click
A message from your mobile carrier about a SIM, a port or an account PINA SIM swap or port-out attempt on your lineCall the carrier, not the number in the message

One code, for an account you own

The common case, and the one where the advice everybody gives is actually right. Somebody entered a password for your account and the service asked them for the second step. Either the password was correct, or on some services the code goes out at the identifier stage before the password is checked.

What it tells you is that the password for that account is worth changing, and that if you reused it, every other account using it is now on the list too. What it does not tell you is whether anyone got in: the second step did its job, which is the entire point of having one. Can 2FA be bypassed? is the longer argument about the routes that avoid the code altogether, and it is worth reading afterwards rather than now.

A burst of codes or prompts

Several messages inside a few minutes, or push prompts arriving one after another. This is the push bombing case above, and the password is already working. The attacker is now betting that you will approve one of the prompts by accident, by habit, or just to make the phone stop.

Two things matter here. Do not approve, obviously, but also do not assume that denying them all is the end of it: the attacker can resume whenever they like, because what they hold is the password, and that does not expire. The only thing that stops this is changing the password, which is step one of the triage below.

If the service offers number matching, turn it on afterwards. CISA describes it as the setting that "forces the user to enter numbers from the identity platform into their app to approve the authentication request", and the reason it works is mechanical: "Users cannot approve requests without entering the numbers on the login screen", which only appears on the attacker's screen, not yours.

A code for an account that is not yours

A verification mail or text for a service you have never used, or addressed to a name that is not yours. This is the cause the ranking pages skip entirely, and it is probably the most common of the four.

Somebody typed their own email address or phone number wrong and typed yours instead. Google documents exactly this case: "If you received an account verification email in error, it's likely that another user accidentally entered your email while trying to recover their own email account", and the instruction is to do nothing at all (Google Account Help). Recycled phone numbers produce the same effect for years after the previous owner gave the number up.

The one thing not to do is click the link or complete the verification to "sort it out". Completing it can attach your address to somebody else's account, and in the version where the message is a forgery rather than a mistake, the link is the attack.

A message from your carrier, not from a service

Check the sender. If the message is about your mobile line rather than about an account on a website, it belongs in a different category and is the most urgent of the four. A confirmation of a SIM change you did not make, a port-out request to another carrier, or a code to change the PIN on your carrier account all mean somebody is trying to take the phone number itself.

That matters because the number is the recovery route for a great many accounts. The FBI's Internet Crime Complaint Center recorded 1,611 SIM swapping complaints in 2021, with adjusted losses of more than $68 million, against 320 complaints and roughly $12 million across the whole of 2018 to 2020 (IC3 PSA, February 2022). In the United States, the FCC adopted rules in November 2023 requiring carriers to authenticate a customer securely before a SIM change or a number port, and to notify the customer when one is requested (Federal Register notice). That notification requirement is why this message exists: it is the system working.

Phone the carrier on the number printed on your bill or on the back of your card, never a number in the message, and ask them to put a port freeze and a verbal passcode on the account. Then read authenticator app vs SMS: what SIM swapping changes, because this cause is the clearest argument there is for getting your codes off the phone network.

The call that usually comes next

None of the four causes is the scam the FTC wrote its alert about, but one of them often leads to it. Having triggered a code to your phone, the attacker calls or messages you, apologises for the confusion, and asks you to read the digits back to confirm your identity, close a fraudulent order, or release a delivery. The FTC's consumer alert on verification codes is the clean summary of that call and is worth reading once.

The rule is short enough to memorise: a code is proof of identity, so handing it over is handing over your account. There is no situation, ever, in which a genuine support agent, courier, bank or marketplace buyer needs to hear it.

The next ten minutes, in order

A padlock being re-keyed, then signed-in devices swept off a stack
Reverse these two and the intruder keeps the session, now wrapped in the password you just chose.

Order matters more than speed here. Doing these in the wrong sequence can leave the intruder signed in with the new password already applied around them.

1. Change the password on the account that was named

Not a variant. Not last year's password with a digit added. If that password existed anywhere else, those accounts are now on this list too, starting with the email address the account recovers through.

2. Then sign out every other session

This is the step the pages ranking for this query do not mention, and it is the one that decides whether the previous step accomplished anything.

A password protects the login. A session is what exists after a login, carried in a cookie or a token, and it is a separate thing that the service has to be told to end. Changing the password does not always end it. Google, which handles this better than most, still documents three exceptions: after a password change "you'll be signed out everywhere except" devices you use to verify it is you when you sign in, "some devices with third-party apps that you've given account access", and "helpful home devices that you've given account access" (Google Account Help).

Microsoft's own documentation for revoking a user's access is blunter about the gap. "By default, access tokens issued by Microsoft Entra ID last for 1 hour", and so "access tokens might pose a security risk if they need to be revoked within a period shorter than their typical one-hour lifespan". For applications holding their own session cookie it is worse: "Microsoft Entra ID can't directly revoke a session token issued by an application", and "the existing sessions end as soon as the token expires" (Microsoft Learn). That is written for administrators handling a compromised employee account, but it is the same mechanism underneath your personal one.

OWASP's requirement is that "the session ID must be renewed or regenerated by the web application after any privilege level change within the associated user session", and it lists password changes among the scenarios (OWASP Session Management Cheat Sheet). The reason a standards body has to say so is that plenty of applications do not. You cannot audit that from outside, so do not try: use the session list and end them yourself, after the password change, so that nothing that reconnects can do it with the old credentials.

3. Read the sign-in history

Where it lives, service by service, is the next section. Look for a sign-in from a place or a device you do not recognise, and for anything stranger than that: a new recovery email, a forwarding rule you did not create, a second authenticator registered last week.

4. Check what is registered as a second factor

More important than the list of sign-ins, and almost never mentioned. If an attacker got in, the thing they do first is add their own way back: another authenticator app, another phone number, an app password. Open the account's two-factor settings and read the list of registered methods as a list of keys. Anything you do not recognise comes off.

5. Collect fresh backup codes

Regenerating invalidates the previous set, which is exactly what you want if an old set is somewhere you no longer control. Where to store your 2FA backup codes covers the only part of this that is hard, which is where to put them.

6. Do the same for the mailbox behind the account

Almost every account resets through an email address. An intruder who cannot defeat your authenticator will go for the mailbox instead, where the reset link usually arrives with no second step at all. If you do one account tonight beyond the one that was named, do the email account. Locked out of email and 2FA is the version of this problem you do not want to meet.

Where the sign-in history actually lives

A magnifying glass over sign-in rows with one unfamiliar entry highlighted
The entry worth finding is rarely the odd location. It is the second factor somebody registered last week.

"Check your account's security page" is the instruction every page gives and nobody can follow. These are the real paths, as the services themselves document them. All six are free, take under a minute each, and none of them needs you to install anything.

ServiceWhere to lookWhat you get
GoogleGoogle Account, then Security, then Review security events on the "Recent security events" panel (Google)Dated sign-ins and security changes, plus a "Secure your account" button that starts the clean-up
Microsoftaccount.live.com/Activity, or account.microsoft.com/security and then Review activitySign-ins with device, app and approximate location, each markable as "This wasn't me"
AppleSettings, your name, then scroll to the device list on iPhone; account.apple.com then Devices on the web (Apple)A device list rather than a sign-in log. Removing a device means it "won't display verification codes for two-factor authentication"
Facebook and InstagramAccounts Center, then Password and security, then Where you're logged in (Meta)Every signed-in phone, tablet and browser with a rough location, and a log-out control beside each one
GitHubSettings, Access, then Sessions; and Settings, Archives, then Security log (GitHub)The best of the six. "The security log lists all actions performed within the last 90 days", including every change to your two-factor settings
AmazonYour Account, Login & security, then Secure Your AccountThe sign-out control rather than a history. Thinner than the rest, so treat the sign-out as the action and the order history as your evidence

Two honest notes about that table. Apple's list is devices, not sign-ins, so it will not show you a failed attempt or a sign-in from a browser; and Amazon publishes the least of the six, which is a reason to put a unique password on it rather than a reason to stop looking. GitHub is the one worth copying as a model: its log records the two-factor changes themselves, which is precisely the evidence you want and precisely what the others mostly hide.

What not to do, however reasonable it sounds

  • Do not reply to the message. A reply confirms the number is live and reaches nobody at the service.
  • Do not tap the link inside it. If the message is a forgery, the link is the attack; if it is genuine, you can reach the same page by typing the address yourself.
  • Do not approve one prompt "to make it stop". That is the entire mechanism of push bombing, and it is the outcome the attacker is paying for.
  • Do not call the number in the message. Use the number on your card, your bill, or the service's own site.
  • Do not ignore a repeat. A single code once is noise. The same code arriving three evenings running is somebody working through a list with your password on it.
  • Do not assume a code that stopped being accepted is related. It usually is not: a drifted clock or a stale entry produces the same symptom with nobody else involved, and 2FA code not working works through those in order.

Why an authenticator app ends this entire class of message

Here is the structural point, and it is the reason this post sits on an authenticator app's blog rather than a security vendor's.

Every one of the four causes above needs a channel that delivers something to you. The texted code needs a phone number. The push prompt needs a server that can reach your device. The mistyped signup needs an address or a number that somebody can type. The SIM swap needs a line to take over.

A TOTP app receives none of those. The code is computed on your device from a secret stored there and the current time, on a step RFC 6238 recommends be 30 seconds by default. Nothing is sent to you, so there is nothing to intercept; there is no number attached, so there is nothing to SIM-swap; and there is no server that can push you a prompt, so there is nothing to flood. The app produces codes with the phone in aeroplane mode, which is the simplest demonstration that no channel exists. An account on TOTP cannot generate the message that brought you to this page, and that is not a feature anybody implemented. It is what is left when the channel is removed.

That is a real answer to three of the four causes, and it is the one worth acting on this week. Authenticator app vs SMS is the longer version, and changing your phone number is the checklist for the accounts that still have your old one in a recovery slot.

And where it stops

An authenticator app does not make you unphishable, and saying otherwise here would be dishonest.

A TOTP code can still be relayed. A real-time phishing proxy sits between you and the genuine site: you type your password and your six digits into a page that looks right, it passes both straight through to the real service while they are still valid, and it keeps the session that comes back. The code was never intercepted in transit, because there is no transit. It was typed into the wrong page by you, in real time, and the proxy used it within its 30-second life. No authenticator app can detect this, KeyNesta included.

KeyNesta ships no passkeys and sells no security keys. The features page names passkeys among what is not built, and an authenticator app of any kind is not a FIDO authenticator. For the one or two accounts you genuinely could not afford to lose, those are the stronger answer, because both bind the login to the real site's domain and simply refuse to produce anything for a lookalike. That is the honest recommendation even though it points away from our own product: authenticator app vs security key is where to start if you have never bought one, and passkeys vs authenticator apps is the other half of the same answer.

What KeyNesta does do is the category it is for. Codes are generated locally from the secret and your device clock, with nothing fetched and nothing reported, so there is no channel for any of the four messages above to arrive through. Sync between devices is end-to-end encrypted and zero-knowledge, which is its own trade worth understanding before you rely on it (what zero-knowledge costs you); 2FA backup and sync is how the moving-accounts-over part works, and the web app at app.keynesta.com needs no sign-up if you would rather look before installing anything.

Takeaway

A code you did not request is a signal, not a verdict. Read it before you react: one text means somebody is trying a password, a burst of push prompts means somebody already has one, a code for an account that is not yours means a stranger mistyped their own details, and a message from your carrier about your line means somebody is going after the phone number itself.

Then do the triage in order, and do not stop at the password. Change it, revoke every session afterwards, read the sign-in history, and check what is registered as a second factor, because the thing that costs people their accounts is not the message they received. It is the spare key somebody added while they were inside, on an account that looked fine afterwards because the password had been changed.

And once that account is calm, move it off texted codes. The best outcome of an evening like this one is that the message cannot be sent to you again.