Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jovijovi/two-fa.js
A two-factor authentication(2FA) based on HOTP & TOTP written in TypeScript.
https://github.com/jovijovi/two-fa.js
2fa hotp totp two-fa two-factor
Last synced: about 2 months ago
JSON representation
A two-factor authentication(2FA) based on HOTP & TOTP written in TypeScript.
- Host: GitHub
- URL: https://github.com/jovijovi/two-fa.js
- Owner: jovijovi
- License: mit
- Created: 2022-06-09T02:54:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-08T03:59:37.000Z (over 2 years ago)
- Last Synced: 2023-06-11T03:34:26.784Z (over 1 year ago)
- Topics: 2fa, hotp, totp, two-fa, two-factor
- Language: TypeScript
- Homepage:
- Size: 237 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Two-FA.js
[![npm](https://img.shields.io/npm/v/@jovijovi/two-fa.js.svg)](https://www.npmjs.com/package/@jovijovi/two-fa.js)
[![GitHub Actions](https://github.com/jovijovi/two-fa.js/workflows/Test/badge.svg)](https://github.com/jovijovi/two-fa.js)
[![Coverage](https://img.shields.io/codecov/c/github/jovijovi/two-fa.js?label=\&logo=codecov\&logoColor=fff)](https://codecov.io/gh/jovijovi/two-fa.js)A two-factor authentication(2FA) based on HOTP & TOTP written in [TypeScript](https://www.typescriptlang.org).
## Philosophy
*:kiss: KISS. Keep it small and simple.*
## Features
- Based on HOTP/TOTP algorithm
- Get code by raw key
- Get code by encoded key
- Encode/Decode key
- Gen random key## Development Environment
- typescript `4.7.4`
- node `v16.15.1`
- ts-node `v10.8.2`
- yarn `v1.22.19`## Install
```shell
npm install @jovijovi/two-fa.js
```or
```shell
yarn add @jovijovi/two-fa.js
```## Usage
```typescript
import {twofa} from '@jovijovi/two-fa.js';const code = twofa.GetCode(key);
console.debug("Code=", code);
```## Roadmap
- Documents
- QR## License
[MIT](LICENSE)