1.0.5 • Published 3 years ago

eknot v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

eknot

eknot is a Node.js library to generate totp codes with a single API.

Usage

npm i -D eknot

Example Usage

import {generateTotpFromFile} from 'eknot'
import * as path from 'path'

const example = async (account: string) => {
    const projectBaseFolder = path.join(__dirname, '../')
    const imagesFolder = path.join(projectBaseFolder, 'examples/images')
    const totp = await generateTotpFromFile(`${imagesFolder}/${account}.png`)
    console.log(`Account: ${account} - ${totp}`)
}

example('example1') // Account: example1 - 034624
example('example2') // Account: example2 - 084841

Description

This repository is a clone of the popular authy application used to generate 2FA codes.

This project uses:

Setup

Make sure you have Node.js installed on your machine

Development

Installation

  • Clone this repository git clone git@github.com:thomaschaplin/eknot.git
  • Change directory cd eknot
  • Install the dependencies npm install
  • Transpile the code npm run build or npm run watch

Tests

  • Run the tests npm test
  • Run the tests with coverage npm test:coverage

Image by mohamed Hassan from Pixabay

1.0.2

3 years ago

1.0.1

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago