npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

quick-2fa

v1.0.10

Published

Sick of looking for your phone when it is time to enter two-factor authentication token?

Downloads

30

Readme

quick-2fa

Sick of looking for your phone when it is time to enter two-factor authentication token?

Install:

$ npm install -g quick-2fa

Then save your key to keychain:

$ quick-2fa --save KEY-NAME YOUR-KEY

Example:
$ quick-2fa --save vpn QWERTYUIOPASDFGH

Then whenever you need a token run:

$ quick-2fa KEY-NAME

Example:
$ quick-2fa vpn

This utility will print the token to console and to OS notification and will also put it in your clipboard!

Works on mac, windows and linux!

Global hotkey

  1. Install some hotkey management application such as BetterTouchTool
  2. Define global hotkey which executes: /usr/local/bin/node /usr/local/bin/quick-2fa KEY-NAME

Now, whenever you need to enter your two-factor authentication token, press the global hotkey, wait for OS notification to appear, and then just paste (token will already exist automatically in your clipboard). Hell, you can even go crazy and make BetterTouchTool paste and click the login button for you!

Retrieving your key

Usually when setting up two-factor authentication, you get a qr code which you should scan with your phone. Try to look into the address of the image which represents that qr code, your key might be encoded in the address. Alternatively, scan the qr code with an app such as Barcode Scanner, it will show you the decoded text from the qr code, which should contain your key.

Stay safe

Remember that now your key which generates two-factor authentication tokens is stored in the keychain on your machine. In order to keep it safe make sure you protect your machine with a strong password for cases where it is stolen or someone gains temporary physical access to it.

Are you compromising security by storing this key in your keychain and by making it possible to generate tokens on your machine? Well, not more than having the same already on your phone. Basically if someone steals your phone he will have the same secret information. Since phones are much easier to steal than computers, the risk using this tool is adding is acceptable.

Troubleshooting

On mac, make sure you have latest node installed.

On windows, if you get errors regarding python/msbuild/vcbuild, make sure you have latest node installed. Only if that doesn't help, run following command and try to reinstall quick-2fa:

# run in administrator privileged command prompt window 
npm install --global --production windows-build-tools

On linux, you might need to install gnome-keyring for this tool to work. See details in keytar docs.