QR code generator, update readme
Added a QR code code generator that might be used for auth. Updated README with better instructions for setting up Tahoe grid.
This commit is contained in:
parent
ec1ed9e487
commit
70a92cb0e6
7 changed files with 75 additions and 236 deletions
|
@ -1,12 +1,15 @@
|
|||
import * as OTPAuth from 'otpauth'
|
||||
|
||||
let secret = new OTPAuth.Secret({ size: 20 })
|
||||
|
||||
export const totp = () => {
|
||||
let totp = new OTPAuth.TOTP({
|
||||
issuer: 'Private data',
|
||||
label: 'otp',
|
||||
algorithm: 'SHA1',
|
||||
algorithm: 'SHA256',
|
||||
digits: 6,
|
||||
period: 300,
|
||||
secret
|
||||
})
|
||||
|
||||
let token = totp.generate()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue