“This is the 12th day of my participation in the Gwen Challenge in November. See details of the event: The Last Gwen Challenge 2021”.

Dear, hello, everyone. I am “Front-end Xiaoxin”. 😇 has been engaged in front-end development and Android development for a long time


In recent days, I suddenly found such an email in my mailbox, which I usually ignored directly. Today, WHEN I needed wang NPM warehouse to push a version, I found it failed, so I just remembered to read the specific content of this email. To make sure you’re doing it yourself we’ve added a dynamic captchas feature. The specific startup process is written below, unenabled to operate it.

How to enable:

  1. Log in to NPM using your account and password.
  2. Click on your profile picture to find the Account option as shown below:

  1. Find the Two Factor Authentication window, and the button that is not open is Modify 2FA. Click your button to verify the login password, and then go to Modify the security protection, as shown below:

  1. You are advised to select Authorization and Publishing. The first Authorization requires code scanning. Therefore, add the following operations:
    1. Download App: Authenticator, and the main page is as follows:

  1. Then click the plus sign on the upper right corner and select other types to scan:

  1. After scanning the codes, you can submit the modified security defense options.

Note: If the password has not been changed for a long time, you are advised to change the password 📣.

How to use:

When we publish through the command line, we add the dynamic verification code before and after publish on the basis of the original account, password and mailbox input items. Very like the original game with the general order, Qiankun lock, later QQ security token 🤪.

#! /usr/bin/env bash
npm config set registry=https://registry.npmjs.org
echo 'Please perform login related operations:'
npm login # landing
echo "-------publishing-------"
npm publish # release
echo "Publish complete. Please note the actual console output."
exit
Copy the code

Welcome to follow my public account “Front-end Xiaoxin students”, the first time to push original technical articles.