You have just changed a password, or your cursor is hovering over the button, and a second worry has arrived behind the first one. Is this going to break the app that gives you the six digit codes? Will the next sign in ask for something your phone can no longer produce? Are you about to spend an evening scanning fresh QR codes on thirty accounts?
Here is the rule, before anything else. Changing a password does not reset two factor authentication, and it does not change the codes your authenticator app produces. The password and the code secret are stored separately, checked separately, and there is no mechanism by which one rewrites the other. Your app will keep producing the same six digits on the same thirty second rhythm, for the same accounts, as though nothing had happened.
For most people that is the whole answer, and the pages ranking for this question do not give it. Two of them are single vendor walkthroughs written for somebody already locked out: HubSpot's reset page is the closest any of them comes, because it states that an authentication reset removes "your 2FA methods and any passkeys" and "will not reset your user password", and then stops without ever turning that around into the answer you came for. A Microsoft Q&A thread titled exactly "change password" carries one machine written answer that walks through two password change screens and tells you to add the account to Authenticator "again if needed", without saying whether you need to. And a Bitwarden community thread describes the one real exception, as one person's accident, with no general rule drawn from it.
So this page runs the rule, then the mechanism that makes it true, then the four cases where code access genuinely does break, and then the part none of those pages reaches: what a password change does not fix, and what does.
The short answer
- A password change leaves your authenticator secret alone. That secret was handed to your app when you scanned the QR code. Nothing in a password change reaches it, so there is no re-scan and no new codes.
- Codes are computed, not stored. Six digits derived from the secret and the current time, every thirty seconds (RFC 6238). Change the password and both inputs are unchanged, so the output is unchanged.
- Four things do break code access, and none of them is the password change by itself: codes kept inside a password manager you have just locked, a recovery flow that strips two factor authentication to let you back in, an administrator forcing re-registration, and revoked sessions that start asking for a code you had stopped seeing.
- A password change evicts nobody who already holds a copy of your secret. A screenshot, an export file, a shared device, a code you once read out loud: a new password reaches none of them.
- Only removing two factor authentication and enrolling again issues a new secret, and that is the step that actually locks a copy holder out.
- Most providers invalidate your old backup codes when you re-enrol. Download the replacements in the same sitting, before you close the page.
- KeyNesta is an authenticator app. Changing your KeyNesta passphrase re-wraps your vault and alters no TOTP secret. We hold no passkeys and no security keys, and we cannot reset anything on a third party account.
Why your password cannot reach your codes
When you set up an account's second factor by scanning a QR code, the service handed your app one short string: a shared secret, with the account name and issuer attached. That string is the whole payload. Every code you have seen since is arithmetic performed on it, because the standard computes each code from the secret and the current time step. That is why your app works on a plane, and why the number dies after thirty seconds.
Your password lives somewhere else entirely, and in a different form. The service does not keep your password; it keeps a verifier derived from it, so that it can recognise the right password without being able to reproduce it. GitHub describes its own side of that plainly, noting that it checks a typed password against breach datasets at the moment you type it and "never stores the password you entered in plaintext".
So there are two records, with two jobs. One answers "is this the right password". The other answers "does this six digit number match what the clock says it should be". Writing a new verifier into the first record cannot alter the second, for the same reason that changing the lock on your front door does not change your car key.
Two consequences follow, and they are worth holding on to because the exceptions below are all variations on them.
Nothing about the code changes, including the account label. If your app lists an entry under an old email address or an old display name, a password change will not refresh it, because that label was copied into your app at setup time and the service has no way to reach back into your phone. A stale label is cosmetic. It is not a sign that the entry has stopped working.
The service still holds its own copy of the secret, because it needs one to check your codes. No provider will hand that copy back. Every documented route is re-enrolment, which mints a brand new secret and retires the old one.
Four cases where code access really does break
None of these is a password change resetting your second factor. Each is a different thing happening at the same time, which is exactly why people conclude the password change did it.
Your codes live in a password manager, and you just locked it
This is the real exception, and it is a circular one. If your one-time codes are stored inside a password manager vault, then anything that locks that vault takes your codes with it until you unlock it again. Bitwarden's documentation states the behaviour directly: "Changing your master password will automatically log you out of the web vault session. Other logged-in apps may remain active for up to an hour, but will eventually also require you to log back in with your new master password."
Ordinarily that is a minor inconvenience: you type the new master password and your codes come back. It becomes a trap in one specific configuration, which is the one that produced the community thread. A user kept the two factor code for the Bitwarden account itself inside the Bitwarden vault, synced out to the Bitwarden Authenticator app. Changing the master password logged the vault clients out, which cut the sync feeding the authenticator, which meant the code required to sign back in was now behind the sign in. They had not saved the two factor recovery code, and the account was unrecoverable; the help they got was to rescue what they could from an older export and start again.
Note what the forum moderator in that thread says, because it is correct and it matters: the two factor settings themselves were unaffected by the master password change. What broke was the path to the code, not the code. The lesson generalises to every password manager: never keep the second factor for a vault inside that same vault, and keep its recovery code somewhere the vault is not. The wider trade-offs are worked through in should your 2FA codes live in your password manager.
A recovery flow traded your 2FA away to let you back in
Some reset routes are explicitly designed to remove your second factor, because removing it is the price of proving who you are by another means. That is not a side effect of a password change. It is the product working.
HubSpot's is a clean published example: the authentication reset removes "your 2FA methods and any passkeys" from your login, runs through a Super Admin or a photo ID check, and expressly "will not reset your user password". Anyone who went through that route and then changed their password afterwards will remember the two events as one, and blame the wrong one. If your second factor is gone after a bad week, retrace whether a recovery flow took it, rather than assuming the password did.
An administrator forced a fresh registration
On a work or school account, somebody else can reset your second factor, and will not necessarily tell you first. In Microsoft Entra, an administrator's "Require re-register multifactor authentication" action deactivates the user's hardware OATH tokens and deletes phone numbers, Microsoft Authenticator registrations and software OATH tokens, so the next sign in asks the user to set a method up from scratch.
The detail worth knowing is that this is a separate action from revoking sessions, which invalidates refresh tokens. An administrator can do either without the other, which is why a work account can start demanding a brand new setup on a day you did nothing, or stay signed in everywhere on a day you expected the opposite. If your employer's account suddenly wants a fresh QR code, ask IT before you start troubleshooting your phone. The same boundary question comes up when you are running work two factor on a personal phone.
Sessions were revoked, so a code reappears
This is the most common false alarm of the four, and nothing is broken at all. A password change does usually end sessions, and a sign in that follows one asks for the second factor again. If you have not seen a code prompt for months because every device you own was already trusted, being asked for one feels like something has changed about your 2FA. It has not. You are simply at the front of the queue again.
Google states its own version of this precisely: a password change signs you out everywhere apart from three categories, which are the devices you use to verify your identity when you sign in, some devices running third party apps you have granted account access, and home devices you have granted account access. On a personal Microsoft account, the dedicated "Sign out everywhere" control is separate from the password change, and Microsoft warns it can take up to 24 hours to take effect across devices, with an Xbox console excepted. Remembered devices are the other half of why the prompt comes and goes.
What every other page misses: a new password evicts nobody
Here is the part that matters most if you are reading this because something went wrong rather than because you were curious.
Suppose somebody else has a copy of your two factor secret. Perhaps you screenshotted the setup QR code into a camera roll that syncs. Perhaps you exported your authenticator to a file. Perhaps you set the account up on a shared tablet, or read the setup key out to someone who was helping. The secret is a short string, and a short string copies perfectly.
Changing your password does not reach any of those copies. Their app keeps computing the same correct six digits it always did, because it is doing arithmetic on a number the service still accepts. If that person also learns the new password, your second factor waves them straight through, exactly as it did before. This is the quiet failure in every "I changed my password, so I am safe now" reflex.
What does reach them is re-enrolment. Removing two factor authentication from the account and setting it up again issues a brand new secret, and every copy of the old one instantly computes numbers the service rejects. That is the eviction, and it is the only one available to you.
Two related half-measures are worth naming, because people reach for them and then overestimate what they bought. Ending sessions is good and you should do it, but Google's own exception list above shows how partial it can be. And on GitHub, resetting your password does not sign out the mobile app at all: the documented way to do that is to revoke your authorization of the GitHub iOS or GitHub Android OAuth app, which signs out every instance of it. If you are reasoning about who still has a way in, read can 2FA be bypassed and what happens when you share codes.
Issuing a new secret, provider by provider
The order of operations is the same everywhere, and getting it wrong is how people lock themselves out while trying to get safer.
- Change the password first. Several providers ask for the current password on the screen where you remove the second factor, so doing it the other way round means typing a password you are about to abandon.
- Check you can complete the new enrolment before you break the old one. A working authenticator on hand, or a second device, or the phone number the service will text.
- Remove the old method.
- Enrol the new one, and verify a code before you close the page. GitHub puts this as a warning in its own documentation, and it applies universally: only replace the existing entry on your device after the new method is saved to the account completely.
- Download the fresh backup codes in the same sitting.
- Only then delete the stale entry from your authenticator app.
Turning 2-Step Verification off and on again is the full teardown, and Google is blunt about the collateral. Its own instructions for turning it off tell you to destroy every backup code you had saved for the account, and to revoke any app passwords you were using, because those break when 2-Step Verification goes off. Turn it back on, choose the authenticator app, scan the new QR code, and you have a new secret and an obligation to save a new set of codes.
Microsoft
On a personal Microsoft account, change the password at the account dashboard, then use the separate "Sign out everywhere" control, and allow for the 24 hours Microsoft says it can take. Then remove and re-add the sign-in method so the secret is reissued rather than merely re-authenticated. On a work or school account, you usually cannot do this yourself: ask an administrator for a re-registration, and ask them to revoke sessions as well, since those are two different buttons.
Apple
Apple is shaped differently, and the difference is the point. There is no TOTP secret in an Apple Account to reissue: verification codes are displayed on your trusted devices or sent to a trusted phone number. Two factor authentication also cannot be turned off if the account was created with it, and otherwise only within a two week window after you enable it. So "re-enrol to evict somebody" does not apply. The equivalent move is to change the password and then remove the device from your account, which stops it displaying verification codes and cuts its access to iCloud. Review your trusted phone numbers in the same pass.
GitHub
GitHub is the one that rewards reading the documentation, because it lets you rotate the secret without burning anything else. Editing your TOTP method shows a fresh QR code and setup key, and GitHub states that reconfiguring your 2FA settings without disabling 2FA will not change your recovery codes, and that it also keeps your membership in organisations that require 2FA. Disabling and re-enabling is the heavier path, and GitHub says that generates a new set of recovery codes which invalidates the previous set.
A bank
Banks almost always put the reset behind the password you have just set, which forces the order above. Alpine Bank's published steps are representative: go to Settings, then Security, then Edit Settings under two factor authentication, confirm your password, and remove the verification method, after which you enrol again at the next sign in. Expect two further things that are normal and not faults: a fresh code challenge whenever you move to a new device or browser or clear cookies, and a bank that offers only a phone number rather than an authenticator app. If yours is in the second group, authenticator app versus SMS is its own topic.
What happens to your old backup codes
This is the step people skip, and it turns a tidy security improvement into a lockout three months later.
A password change on its own does not touch your backup codes. Re-enrolment generally does, and the providers say so in different words. Google tells you to destroy your saved codes when you turn 2-Step Verification off, and says that creating a new set automatically makes the old set inactive. GitHub says that generating a new set of recovery codes invalidates any codes you previously generated, and that disabling and re-enabling 2FA produces a new set, while a straight reconfiguration leaves them alone.
The safe general rule, which costs nothing to follow even where it is unnecessary: treat the old sheet as dead the moment you re-enrol, and file the new one before you leave the settings page. Where to put it is a question with a real answer, worked through in where to store your 2FA backup codes. And if the codes you already hold are being refused, that is a different diagnosis entirely.
If you have just been breached, this is the order
Password first, because it is fast and it ends the easy route in. Then the rest, in this sequence:
- Change the password on the compromised account, from a device you trust.
- End every session the account offers to end, and remember that this is partial. Check the account's device list by hand and remove anything you do not recognise.
- Revoke third party app access, because an app authorization survives a password change by design. On GitHub this is also how you sign the mobile app out.
- Re-enrol the second factor, which issues the new secret and is the only step that evicts a copy holder.
- Save the fresh backup codes before you close the page.
- Check the recovery routes, meaning the recovery email address and the phone number on file, because an intruder who got in once may have added their own. This is the step that keeps the loop from reopening, and breaking that loop deserves its own hour when the account is a mailbox.
- Work outwards to every account that used the same password or routes its recovery through the breached one.
If the trigger was a lost or stolen handset rather than a password leak, the priority order is different, and phone stolen, two factor authentication in order is the page for that.
Where KeyNesta fits, and what it cannot do
Our own product is subject to the same rule this page is about, and we can be exact about it rather than vague.
Changing your KeyNesta passphrase does not alter a single TOTP secret. The vault is encrypted with a random master key, and your passphrase never encrypts your entries directly: it only unwraps the key that does. Our security architecture describes what a passphrase change actually rewrites, which is one small keyslot of a few hundred bytes, while the vault itself is never re-encrypted, never decrypted to disk and never exposed during the change. Your entries, their secrets and the codes they produce are identical before and after.
The sync account password and the vault passphrase are deliberately two different credentials, with two different jobs. The account password authenticates you to the sync service; the passphrase unwraps your master key and never leaves your devices. Changing the account password therefore decrypts nothing and alters nothing, and is covered further in what our server stores.
We hold no passkeys and no security keys. Both are named on the features page among the things deliberately not built. For the one or two accounts where a real-time phishing proxy would be the disaster, a hardware key or a passkey is the better answer, and this page is not going to pretend otherwise: see authenticator app vs security key and passkeys vs authenticator apps.
And we cannot reset two factor authentication on any third party account. No authenticator app can. Only the service that issued the secret can retire it, which is why every provider section above sends you into that provider's own settings.
Frequently asked questions
Will I have to scan a QR code again after changing my password?
No. The QR code existed to deliver the shared secret to your app once, and that secret is untouched by a password change, so there is nothing new to deliver. You only scan again when you deliberately re-enrol, when you move the entry to a different app or device without an import, or when a provider or an administrator has reset your enrolment for you.
My authenticator still shows the old email address on an entry. Should I fix it?
Only if it bothers you. That label was copied into your app when you set the entry up, and no password change or email change reaches back into your phone to refresh it. The code is computed from the secret, not from the label, so a stale name has no effect on whether the digits are accepted. Rename the entry locally if your list is getting hard to read.
Does a forgot-password reset behave differently from a password change?
For your codes, no: both write a new verifier and leave the secret alone. The difference is what the service asks for on the way through. A reset link usually still demands your second factor before it will let you set a new password, which is exactly why a lost authenticator turns a simple reset into a recovery case rather than a five minute job.
I changed my password after a breach and the intruder is still active. How?
Because a password was only one of their routes in. Three outlive a password change by design: a session or device the account did not sign out, a third party app authorization you granted at some point, and a copy of your two factor secret. Work through the ordered list above rather than repeating the password change, since the second attempt removes no more than the first did.
Should I switch two factor authentication off while I sort the password out?
No, and the gap is larger than it looks. Turning it off leaves the account standing on a password alone at precisely the moment you suspect that password is known, and on most providers it also destroys your saved backup codes on the way out. If a code prompt is blocking you, use a backup code or the provider's recovery route and leave the second factor in place.
Takeaway
The sentence worth keeping is that a password and a code secret are two separate records doing two separate jobs, so rewriting one cannot touch the other. That single fact answers the question, removes the fear of a lost evening, and should let you change the password you came here to change.
The more useful half is what follows from it. Because a password change cannot touch the secret, it also cannot take the secret away from anyone else who has one. If your worry is privacy or an intruder rather than inconvenience, the password is the first step and not the last: end the sessions, revoke the app authorizations, re-enrol the second factor so a new secret is issued, and save the new backup codes before you leave the page.
And once you are in there anyway, make a note of the four exceptions, because each of them is somebody's bad week: codes locked inside the vault they unlock, a recovery route that spent your second factor, an administrator who reset it for you, and a prompt that reappeared simply because the sessions it had been hiding behind are gone.
Sources
- RFC 6238, "TOTP: Time-Based One-Time Password Algorithm"
- Google Account Help, "Turn off 2-Step Verification"
- Gmail Help, "Change or reset your password"
- Microsoft Support, "How to sign out of your Microsoft account everywhere"
- Microsoft Learn, "Manage authentication methods for Microsoft Entra multifactor authentication"
- Apple Support, "Two-factor authentication for Apple Account"
- Apple Support, "About trusted phone numbers and trusted devices for Apple Account"
- GitHub Docs, "Changing your two-factor authentication method"
- GitHub Docs, "Configuring two-factor authentication recovery methods"
- GitHub Docs, "Updating your GitHub access credentials"
- Bitwarden Help, "My Master Password"
- HubSpot Knowledge Base, "Reset two-factor authentication and passkeys"
- Alpine Bank, "Personal Online and Mobile Banking: Two Factor Authentication"