为了你的安全,npm 可能需要额外的验证才能允许你登录你的账户。如果你未启用两步验证,系统可能会要求你通过发送到你账户所配置邮箱的一次性密码来进行验证。

🌐 For your security, npm may require additional verification to allow you to log in to your account. If you do not have two-factor authentication enabled, you may be asked to verify yourself with a one-time password sent to the email address configured for your account.

使用一次性密码登录

🌐 Logging in with a one-time password

  1. 在 npm“登录”页面上,输入您的帐户详细信息并单击登录 Screenshot of npm login dialog
  2. 系统将提示你输入一次性密码,该密码已发送到你的电子邮件。

    Screenshot showing one-time password request
  3. 检查你的电子邮件账户,查找来自 npm 的邮件,邮件中包含你的一次性密码(邮件主题将以“OTP for logging in to your account”开头)。

    Screenshot showing OTP code in email
  4. 在一次性密码字段中输入电子邮件中的数字。

启用双重身份验证

🌐 Enabling two-factor authentication

为了避免通过电子邮件发送的一次性密码进行额外登录步骤,你可以改为使用设备配置双重身份验证 (2FA)。

🌐 To avoid this additional login step, with a one-time password sent to you via e-mail, you can configure two-factor authentication with a device (2FA) instead.

无法访问电子邮件

🌐 Unable to access email

如果你无法访问链接到你的 npm 账户的电子邮件,你可以提交支持票以重置此电子邮件地址。

🌐 If you are unable to access the email linked to your npm account, you can submit a support ticket to reset this email address.

  1. 在 npm“登录”页面上,输入您的帐户详细信息并单击登录 Screenshot of npm login dialog
  2. 在“登录验证”表单下,点击尝试恢复你的账户

  3. 在“请求帐户恢复”页面上,点击开始帐户恢复 Screenshot showing account recovery page
  4. 在“Open a Support Ticket”表格中,输入以下信息:
  • 电子邮件字段中,输入我们的支持团队可以与您联系的电子邮件地址。
  • 我们能帮你做什么? 部分,选择 重置我的邮箱
  • 如果您需要任何其他帮助,请在我们如何提供帮助?部分选择其他,然后在其他详细信息字段中输入更多信息。
    • 如果您之前已将 GitHub 帐户链接到您的 npm 帐户,请选择连接到 GitHub。 这将帮助我们的支持团队验证您的帐户。
  1. 在表单底部,点击提交支持请求