A Two-Factor Auth Client

Related tags

Command Line tfa
Overview

A Two-Factor Auth Client

Tired of having to pull out your phone all the time to grab those 2fa codes?

Install: npm install -g tfa

Getting Help

bash-3.2$ tfa

  Usage: tfa [options] [command]


  Commands:

    enroll-qrcode|enq [options]   enroll using a qrcode file
    enroll|en [options]                   enroll
    generate|gen [options] [label]        generate
    list|l                                list
    delete|d 

Enroll

Most two factor auth services provide a QRCode for enrollment with applications such as Google Authenticator on Android. When you're setting up 2fa, save the QRCode locally. Then do:

tfa enq qrcode.png

Where qrcode.png is the absolute or relative path to your saved QRCode file.

tfa will extract both the secret and a label from the QRCode. The label is used to generate 2fa codes. Many times, however, the label included in the QRCode is not very user friendly. You can set your own local label using the -l option:

tfa enq -l foo qrcode.png

If the qrcode enrollment isn't working for whatever reason, and you happen to know the TOTP secret being used, you can enroll manually:

tfa enroll -s {thesecret} -l {label}

Listing and Generating

To see a listing of enrolled services, do:

tfa list

This will print the list of labels out to the console.

To generate the current TOTP token for a label:

tfa gen {label} (e.g. tfa gen foo)

To generate the current TOTP tokens for all labels:

tfa gen

Cleaning up

To delete a secret:

tfa delete {label} (e.g. tfa delete foo)

Important note about dependencies

The QRCode scanning function depends on the canvas and jsqrcode modules from npm. To use tfa with QRCodes, there are a few unfortunate prerequisite installation steps you will need as documented here:

https://github.com/Automattic/node-canvas/wiki/_pages

It's not fun, but once you're through it, it should just work.

You might also like...

NPM Package that simplifies Auth with Google OAuth2 ๐Ÿ”

NPM Package that simplifies Auth with Google OAuth2 ๐Ÿ”

Node Google OAuth2 ๐Ÿ” A simple authentication flow for Google OAuth2 Explore the docs ยป Report Bug Table of Contents About The Project Getting Started

Jun 17, 2022

Starter Antd 4.0 Admin App Mern( Node.js / React / Redux / Ant Design ) Crud & Auth , Dashboard

Starter Antd 4.0 Admin App  Mern( Node.js / React / Redux / Ant Design ) Crud & Auth , Dashboard

Starter Antd Admin (Crud & auth) Mern App (Express.js / React / Redux / MongoDB) App built for DigitalOcean MongoDB Hackathon CRM Starter Mern Antd Ad

Jan 8, 2023

Disney+ clone with React + Redux + Firebase auth and Firestore

Disney+ (Disney+ Clone) Test it out: Disney+ Disney+_720p.mov Description Beautiful Disney+ clone built with React.js and styled components. Managed R

Apr 18, 2022

Auth model created by Using nodeJs for backend & reactJs for frontend with the help of TailwindCss in styling

Auth model created by Using nodeJs for backend & reactJs for frontend with the help of TailwindCss in styling

The Universal Auth System Using The MERN Stack Including Mysql -- The project is divded to two separte projects 1- The Client side - containing the

Aug 22, 2022

An unofficial, simplified version of the @Shopify/koa-shopify-auth middleware library.

simple-koa-shopify-auth https://www.npmjs.com/package/simple-koa-shopify-auth NOTE: This package is not maintained by or affiliated with Shopify. Desc

Nov 7, 2022

A Remix Auth strategy for working with forms.

FormStrategy A Remix Auth strategy to work with any form. Supported runtimes Runtime Has Support Node.js โœ… Cloudflare โœ… How to use This Strategy gives

Jan 2, 2023

A collection of social media strategies for remix-auth

Remix Auth Socials A collection of Remix Auth strategies for Oauth2 Social logins. ๐Ÿ‘ท If you are interested in creating one of the planned strategies,

Jan 5, 2023

Simple JWT Auth With TRPC prisma & next

Simple JWT Auth With TRPC prisma & next A sample JWT authentication using prisma, @trpc/server @trpc/client @trpc/react in Next.js Simple Usage copy .

Aug 23, 2022

Remix Auth plugin for Twitter OAuth 1.0a

Remix Auth Twitter Remix Auth plugin for Twitter OAuth 1.0a. Supported runtimes Runtime Has Support Node.js โœ… Cloudflare โœ… Demo Try out live demo (sou

Dec 31, 2022

Serve read-only Redis data over a HTTP API with auth

Redis data exposer This was created for Cliptok and not intended for use outside of it. Use at your own peril. This application will serve an API that

May 28, 2022

Remix Supabase Auth

Remix Supabase Auth Bare minimum and un-opinionated example using Remix to implement Supabase's email/password and oAuth Features Signin and Register

Dec 15, 2022

Node.js Auth Boilerplate

 Node.js Auth Boilerplate

Boilerplate Node.js app demonstrating how to add end-to-end authentication & authorization using PassportJs, Express, MongoDb and Permify

Apr 22, 2022

A starter template for Nest.js with MongoDB, GraphQL, JWT Auth, and more!

A progressive Node.js framework for building efficient and scalable server-side applications. Description Nest framework TypeScript starter repository

Dec 25, 2022

A collection of framework specific Auth utilities for working with Supabase.

A collection of framework specific Auth utilities for working with Supabase.

Jan 2, 2023

Auth module for handling JWT's with Nestjs and Passportjs

tokenizer A good way of handling access tokens and refresh tokens with Nestjs and Passportjs by using Prisma as the ORM, PostgreSQL as the Database an

Apr 25, 2022

Connect to private Google Cloud SQL instance through Cloud SQL Auth Proxy running in Kubernetes.

Connect to private Google Cloud SQL instance through Cloud SQL Auth Proxy running in Kubernetes.

โ›… google-cloud-sql A CLI app which establishes a connection to a private Google Cloud SQL instance and port-forwards it to a local machine. Connection

Oct 16, 2022

node.js project based jwt-auth / register-login-logout

JSON Web Token / Authentication-Authorization JSON Web Token allows us to check Authorization (Session Control). JSON Web Token (JWT) is an open stand

Sep 15, 2022

node.js project based jwt-auth / register-login-logout

JSON Web Token / Authentication-Authorization JSON Web Token allows us to check Authorization (Session Control). JSON Web Token (JWT) is an open stand

May 28, 2022

Remix Stack for deploying to Vercel with remix-auth, Planetscale, Radix UI, TailwindCSS, formatting, linting etc. Written in Typescript.

Remix Stack for deploying to Vercel with remix-auth, Planetscale, Radix UI, TailwindCSS, formatting, linting etc. Written in Typescript.

Remix Synthwave Stack Learn more about Remix Stacks. npx create-remix --template ilangorajagopal/synthwave-stack What's in the stack Vercel deploymen

Dec 25, 2022
Comments
Releases(v2.0.0)
  • v2.0.0(May 11, 2019)

    A Two-Factor Auth Client

    Tired of having to pull out your phone all the time to grab those 2fa codes?

    Install: npm install -g tfa

    Getting Help

    bash-3.2$ tfa
    
      Usage: tfa [options] [command]
    
    
      Commands:
    
        enroll-qrcode|enq [options] <qrcode>  enroll using a qrcode file
        enroll|en [options]                   enroll
        generate|gen [options] [label]        generate
        list|l                                list
        delete|d <label>                      delete
    
      Options:
    
        -h, --help     output usage information
        -V, --version  output the version number
    

    Enroll

    Most two factor auth services provide a QRCode for enrollment with applications such as Google Authenticator on Android. When you're setting up 2fa, save the QRCode locally. Then do:

    tfa enq qrcode.png

    Where qrcode.png is the absolute or relative path to your saved QRCode file.

    tfa will extract both the secret and a label from the QRCode. The label is used to generate 2fa codes. Many times, however, the label included in the QRCode is not very user friendly. You can set your own local label using the -l option:

    tfa enq -l foo qrcode.png

    If the qrcode enrollment isn't working for whatever reason, and you happen to know the TOTP secret being used, you can enroll manually:

    tfa enroll -s {thesecret} -l {label}

    Listing and Generating

    To see a listing of enrolled services, do:

    tfa list

    This will print the list of labels out to the console.

    To generate the current TOTP token for a label:

    tfa gen {label} (e.g. tfa gen foo)

    To generate the current TOTP tokens for all labels:

    tfa gen

    Cleaning up

    To delete a secret:

    tfa delete {label} (e.g. tfa delete foo)

    Important note about dependencies

    The QRCode scanning function depends on the canvas and jsqrcode modules from npm. To use tfa with QRCodes, there are a few unfortunate prerequisite installation steps you will need as documented here:

    https://github.com/Automattic/node-canvas/wiki/_pages

    It's not fun, but once you're through it, it should just work.

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(May 11, 2019)

Owner
James M Snell
"I can't breathe" #46 #blacklivesmatter
James M Snell
Glob-aware two-way copying for git

ggcp git-glob-copy โ€” glob-aware two-way copying for git Requirements Node.js >= 16 Install npm i git-glob-cp # or as a global package npm i -g ggcp U

Anton Golub 3 Jul 5, 2022
CLI Command for Two Factor Authentication.๐Ÿš€

CLI Command for Two Factor Authentication.??

Yuga Sun 7 Nov 5, 2022
Open Source two factor authenticator. Built during #SupaLaunchWeek 5!

Archived This repository is archived, please go to https://github.com/otentikapp/clients for future development. Introduction Feeling bothered about h

Aris Ripandi 18 Dec 29, 2022
Auth-Form-Design - Beautiful Auth Form Designed using React ๐Ÿฅฐ.

?? Auth Form Design ?? Features 1. Check Your Password Strength 2. Can Use Suggested Password 3. Enjoy Responsive Design Getting Started with Create R

Samarpan Dasgupta 2 Dec 24, 2022
Source code for the deprecated expo-google-app-auth package. Deprecated in favor of expo-auth-session.

expo-google-app-auth Source code for the deprecated expo-google-app-auth package. Expo Google App Auth API wrapped the deprecated expo-app-auth packag

Expo 4 Nov 2, 2022
Firebase adepter auth process with custom token example in Next Auth

Firebase adepter auth process with custom token example in Next Auth Example of a firebase adapter that works with firebase authentication. A firebase

Low Front 10 Oct 14, 2022
Zero Two Bot,A fully Modular Whatsapp Bot to do everything possible in WhatsApp by Team Zero Two

?? ???????? ?????? ???? ?? A Moduler WhatsApp Bot designed for both PM and Groups - To take your boring WhatsApp usage into a whole different level. T

Sam Pandey 69 Dec 25, 2022
Browser extension for generating HOTP passcodes for Duo Security Multi-Factor Authentication

duo-extension Browser extension for generating HOTP passcodes for Duo Security multi-factor authentication. Compatible with Firefox and Chromium-based

Avik Rao 11 Oct 25, 2022
node.js auth package (password, facebook, & more) for Connect and Express apps

everyauth Authentication and authorization (password, facebook, & more) for your node.js Connect and Express apps. There is a NodeTuts screencast of e

Brian Noguchi 3.5k Dec 17, 2022
Mercurius Auth Plugin

mercurius-auth Mercurius Auth is a plugin for Mercurius that adds configurable Authentication and Authorization support. Features: Define auth directi

null 71 Dec 23, 2022