X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=README.md;h=4fa7379003bbc8932fb54221f1c7a619d26317b3;hb=refs%2Fheads%2Fmaster;hp=98ceeb90026e61d1624ab1a02f95b1aaafff9abf;hpb=cbb0261beae6aabbb5e1d6bb2e371a5246604588;p=squeep-totp diff --git a/README.md b/README.md index 98ceeb9..4fa7379 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # @squeep/totp -Simple helpers for dealing with One-Time Passwords. +Simple helper classes for dealing with One-Time Passwords of varying flavor. ## API @@ -12,7 +12,7 @@ const key = await TOTP.createKey(); // defaults create a hex-encoded sha1 key const { secret, // key encoded as base32 uri, // key and metadata encoded as an otpauth URI - svg, // otpauthg URI encoded as QR code + svg, // otpauth URI encoded as QR code } = TOTP.createKeySVG({ accountname: 'test@example.com', issuer: 'Squeep', }, key, 'hex'); const totp = new TOTP({ @@ -21,4 +21,6 @@ const totp = new TOTP({ }); const token = totp.generate(); // The current token for the key. + +const isValid = totp.validate('123456'); ```