Update README.md

This commit is contained in:
AJ ONeal 2016-01-02 01:13:22 -08:00
parent b3fd9ad34a
commit 524283161e
1 changed files with 25 additions and 3 deletions

View File

@ -19,18 +19,31 @@ This module uses [`notp`](https://github.com/guyht/notp) which implements `TOTP`
(the *Authenticator* standard), which is based on `HOTP` [(RFC 4226)](https://www.ietf.org/rfc/rfc4226.txt)
to provide codes that are exactly compatible with all other *Authenticator* apps and services that use them.
Browser Authenticator
Browser & Commandline Authenticator
---------------------
You may also be interested in [Browser Authenticator](https://github.com/Daplie/browser-authenticator) over at <https://github.com/Daplie/browser-authenticator>
You may also be interested in
Usage
* [Browser Authenticator](https://github.com/Daplie/browser-authenticator) over at <https://github.com/Daplie/browser-authenticator>
* [Commandline Authenticator](https://github.com/Daplie/authenticator-cli) over at <https://github.com/Daplie/authenticator-cli>
Install
=====
**node.js api**
```bash
npm install authenticator --save
```
**command line**
```bash
npm install authenticator-cli --global
```
Usage
=====
**node.js api**
```javascript
'use strict';
@ -53,6 +66,15 @@ authenticator.generateTotpUri(formattedKey, "john.doe@email.com", "ACME Co", 'SH
// otpauth://totp/ACME%20Co:john.doe@email.com?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME%20Co&algorithm=SHA1&digits=6&period=30
```
**command line**
```
# see help
authenticator --help
# generate a key and display qr code
authenticator --qr
```
API
---