GithubHelp home page GithubHelp logo

isabella232 / quick-2fa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wix-incubator/quick-2fa

0.0 0.0 0.0 89 KB

Safely generate two-factor authentication tokens into clipboard

License: MIT License

JavaScript 100.00%

quick-2fa's Introduction

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.

quick-2fa's People

Contributors

shahata avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.