update-search-sensitivity
@reggi/path-to-regexp
dependabot/npm_and_yarn/main/copy-to-clipboard-4.0.2
dependabot/npm_and_yarn/main/eslint-10.4.0
dependabot/npm_and_yarn/main/npmcli/eslint-config-7.0.0
dependabot/npm_and_yarn/main/proc-log-7.0.0
dependabot/npm_and_yarn/npm_and_yarn-826852524d
dependabot/npm_and_yarn/npm_and_yarn-ab9a7f4bc2
deprecate-totp-2fa
dhei/classic-tokens
gat-bypass-2fa-docs
jpg619/fix-accessibility-content-flow
jpg619/version-bump-tar-2
kartykp/gat-bypass-2fa-docs
kartykp/upgrade-path-to-regex
main
maitxn/version-bump-tar
patch-1
reggi/cache-based-on-version
reggi/dev-engines
reggi/fix-transform-prettier
reggi/overrides
update-search-sensitivity
| 1 | --- |
| 2 | title: Recovering your 2FA-enabled account |
| 3 | --- |
| 4 | |
| 5 | import shared from '~/shared.js' |
| 6 | |
| 7 | When you have two-factor access enabled on your account, and you lose access to your 2FA device, you may be able to recover your account using the following methods. |
| 8 | |
| 9 | ## Misplaced second factor device |
| 10 | |
| 11 | If you have misplaced the device that provided second-factor authentication, you can use the recovery codes generated when you [enabled 2FA][setup-recovery-codes] to access your account. |
| 12 | |
| 13 | ### Using recovery code on the web |
| 14 | |
| 15 | 1. Locate the recovery codes generated that you have saved. |
| 16 | |
| 17 | 2. <>{shared['user-login'].text}</> |
| 18 | |
| 19 | <>{shared['user-login'].image}</> |
| 20 | |
| 21 | 3. <>{shared['use-recovery-code'].text}</> |
| 22 | |
| 23 | <>{shared['use-recovery-code'].image}</> |
| 24 | |
| 25 | 4. Enter an unused recovery code in the "Use a Recovery Code" prompt. |
| 26 | |
| 27 | <Screenshot src="/getting-started/setting-up-your-npm-user-account/user-a-recovery-code.png" alt="Screenshot showing use a recovery code prompt with an input box to enter the recovery code" /> |
| 28 | |
| 29 | 5. You are now logged into npm. |
| 30 | |
| 31 | 6. (Optional) To disable 2FA, see "[Disabling 2FA][removing-2fa-on-the-web]". |
| 32 | |
| 33 | ## Viewing and regenerating recovery code |
| 34 | |
| 35 | <Note> |
| 36 | |
| 37 | **Note:** Once you regenerate a set of code, all previous recovery codes become invalid. Each code can be used only once. |
| 38 | |
| 39 | </Note> |
| 40 | |
| 41 | 1. <>{shared['user-login'].text}</> |
| 42 | |
| 43 | <>{shared['user-login'].image}</> |
| 44 | |
| 45 | 2. <>{shared['account-settings'].text}</> |
| 46 | |
| 47 | <>{shared['account-settings'].image}</> |
| 48 | |
| 49 | 3. On the account settings page, under "Two-Factor Authentication", click **Modify 2FA**. |
| 50 | |
| 51 | <Screenshot src="/getting-started/setting-up-your-npm-user-account/2fa-modify.png" alt="Screenshot showing Modify 2FA button" /> |
| 52 | |
| 53 | 4. Click "Manage Recovery Codes" to view your recovery codes. |
| 54 | |
| 55 | <Screenshot src="/getting-started/setting-up-your-npm-user-account/view-recovery-codes.png" alt="Screenshot showing existing recovery codes and a button to generate set of recovery codes" /> |
| 56 | |
| 57 | 5. Click "Regenerate Code" to generate a new set of codes. |
| 58 | |
| 59 | ## Misplaced recovery codes |
| 60 | |
| 61 | If you have misplaced both your 2FA device and your recovery codes, you can contact our support team to attempt to recover your account. Provide as much information as possible to help us expedite the request faster. |
| 62 | |
| 63 | 1. <>{shared['user-login'].text}</> |
| 64 | |
| 65 | <>{shared['user-login'].image}</> |
| 66 | |
| 67 | 2. <>{shared['use-recovery-code'].text}</> |
| 68 | |
| 69 | <>{shared['use-recovery-code'].image}</> |
| 70 | |
| 71 | 3. Under the "Use a Recovery Code" form, click **Try recovering your account**. |
| 72 | |
| 73 | 4. <>{shared['start-account-recovery'].text}</> |
| 74 | |
| 75 | <>{shared['start-account-recovery'].image}</> |
| 76 | |
| 77 | 5. If you have access to your registered email, enter the one-time password sent to your email in the **One-Time Password** field, then click **Verify Email Address**. _If you do not have access to your registered email, select **Skip email verification** at the bottom of the form._ |
| 78 | |
| 79 | 6. <>{shared['support-ticket-form'].text}</> |
| 80 | |
| 81 | - <>{shared['enter-email-address'].text}</> |
| 82 | - In the **How can we help?** section, select **Reset my two-factor authentication (2FA)**. |
| 83 | - <>{shared['support-ticket-other'].text}</><>{shared['connect-to-accounts'].text}</> |
| 84 | |
| 85 | <Screenshot src="/getting-started/setting-up-your-npm-user-account/recover-account.png" alt="Screenshot showing existing recovery codes and a button to generate set of recovery codes" /> |
| 86 | |
| 87 | 7. <>{shared['submit-support-ticket'].text}</> |
| 88 | |
| 89 | [contact-support]: https://www.npmjs.com/support |
| 90 | [configuring-two-factor-authentication]: /configuring-two-factor-authentication |
| 91 | [setup-recovery-codes]: /configuring-two-factor-authentication#enabling-2fa-on-the-web |
| 92 | [removing-2fa-on-the-web]: /configuring-two-factor-authentication#disabling-2fa |
| 93 | [using-recovery-code-on-the-web]: /recovering-your-2fa-enabled-account#using-recovery-code-on-the-web |
| 94 | [viewing-and-regenerating-recovery-code]: #viewing-and-regenerating-recovery-code |