如果你的账户启用了双重访问,并且你无法访问你的 2FA 设备,你可以使用以下方法恢复你的账户。

🌐 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.

遗失的第二重设备

🌐 Misplaced second factor device

如果你丢失了用于二次身份验证的设备,可以使用在你已启用双重验证时生成的恢复代码来访问你的账户。

🌐 If you have misplaced the device that provided second-factor authentication, you can use the recovery codes generated when you enabled 2FA to access your account.

在网站上使用恢复代码

🌐 Using recovery code on the web

  1. 找到你保存的生成的恢复代码。

  2. 在 npm“登录”页面上,输入您的帐户详细信息并单击登录 Screenshot of npm login dialog
  3. 在“双重身份验证”页面上,点击使用恢复代码或请求重置 Screenshot showing Security Key prompt with a link to navigate to the recovery code input screen
  4. 在“使用恢复代码”提示中输入未使用的恢复代码。

    Screenshot showing use a recovery code prompt with an input box to enter the recovery code
  5. 你现在已登录到 npm。

  6. (可选) 若要禁用双因素认证,请参阅“禁用 2FA”。

查看和重新生成恢复代码

🌐 Viewing and regenerating recovery code

注意: 一旦你重新生成一组代码,所有之前的恢复代码将失效。每个代码只能使用一次。

  1. 在 npm“登录”页面上,输入您的帐户详细信息并单击登录 Screenshot of npm login dialog
  2. 在页面的右上角,点击您的个人资料照片,然后点击帐户 Screenshot of account settings selection in user menu
  3. 在账户设置页面的“二步验证”下,点击 修改二步验证

    Screenshot showing Modify 2FA button
  4. 点击“管理恢复代码”以查看你的恢复代码。

    Screenshot showing existing recovery codes and a button to generate set of recovery codes
  5. 点击“重新生成代码”以生成一组新的代码。

遗失的恢复代码

🌐 Misplaced recovery codes

如果你同时丢失了双重认证设备和恢复码,你可以联系支持团队尝试找回你的账户。请尽可能提供更多信息,以帮助我们更快地处理你的请求。

🌐 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.

  1. 在 npm“登录”页面上,输入您的帐户详细信息并单击登录 Screenshot of npm login dialog
  2. 在“双重身份验证”页面上,点击使用恢复代码或请求重置 Screenshot showing Security Key prompt with a link to navigate to the recovery code input screen
  3. 在“使用恢复码”表格下,点击 尝试恢复你的账户

  4. 在“请求帐户恢复”页面上,点击开始帐户恢复 Screenshot showing account recovery page
  5. 如果你可以访问注册的电子邮件,请在 一次性密码 字段中输入发送到你邮箱的一次性密码,然后点击 验证邮箱地址如果你无法访问注册邮箱,请在表单底部选择 跳过邮箱验证

  6. 在“Open a Support Ticket”表格中,输入以下信息:
  • 电子邮件字段中,输入我们的支持团队可以与您联系的电子邮件地址。
  • 我们可以提供什么帮助? 部分,选择 重置我的双重身份验证 (2FA)

  • 如果您需要任何其他帮助,请在我们如何提供帮助?部分选择其他,然后在其他详细信息字段中输入更多信息。
    • 如果您之前已将 GitHub 帐户链接到您的 npm 帐户,请选择连接到 GitHub。 这将帮助我们的支持团队验证您的帐户。
    Screenshot showing existing recovery codes and a button to generate set of recovery codes
  1. 在表单底部,点击提交支持请求