npm 中文文档 npm 中文文档
指南
npmjs.com (opens new window)
指南
npmjs.com (opens new window)
  • 快速入门

    • npm 是什么?
    • npm 安装和更新
    • npm 防止权限错误
    • npm package.json 文件
    • npm 安装包
    • npm 更新包
    • npm 卸载包
    • npm 创建 Node.js 模块
    • npm 发布和更新包
    • npm 使用语义化版本
    • npm 使用 Dist-tags 标记包
    • npm 包和模块的了解
  • 命令行
  • 配置 npm

Receiving a one-time password over email


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


Enabling two-factor authentication


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.


VM313 npm:1 undefined
test:235 Table of contents
Logging in with a one-time password
Enabling two-factor authentication

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


Log in to npm with your user account.Screenshot of npm login dialog

You'll be prompted for a one-time password that was sent to your email.

Screenshot showing one-time password request

Check your email account for an email from npm containing your one-time password (the subject will begin "OTP for logging in to your account").

Screenshot showing OTP code in email

Enter the digits from your email in your one-time password field.

Enabling two-factor authentication


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.

Edit this page on GitHub
Last Updated: 2023-05-15 10:22:02