Update README.md
This commit is contained in:
parent
524283161e
commit
0178e8b89d
22
README.md
22
README.md
|
@ -78,23 +78,17 @@ authenticator --qr
|
|||
API
|
||||
---
|
||||
|
||||
### generateKey()
|
||||
```javascript
|
||||
generateKey() // generates a 32-character (160-bit) base32 key
|
||||
|
||||
generates a 32-character (160-bit) base32 key
|
||||
generateToken(formattedKey) // generates a 6-digit (20-bit) decimal time-based token
|
||||
|
||||
### generateToken(formattedKey)
|
||||
verifyToken(formattedKey, formattedToken) // validates a time-based token within a +/- 30 second (90 seconds) window
|
||||
// returns `null` on failure or an object such as `{ delta: 0 }` on success
|
||||
|
||||
generates a 6-digit (20-bit) decimal time-based token
|
||||
|
||||
### verifyToken(formattedKey, formattedToken)
|
||||
|
||||
validates a time-based token within a +/- 30 second (90 seconds) window
|
||||
|
||||
returns `null` on failure or an object such as `{ delta: 0 }` on success
|
||||
|
||||
### generateTotpUri(formattedKey, accountName, issuer, algorithm, digits, period)
|
||||
|
||||
generates an `OTPAUTH://` scheme URI for QR Code generation.
|
||||
// generates an `OTPAUTH://` scheme URI for QR Code generation.
|
||||
generateTotpUri(formattedKey, accountName, issuer, algorithm, digits, period)
|
||||
```
|
||||
|
||||
**OTPAuth Scheme**
|
||||
|
||||
|
|
Loading…
Reference in New Issue