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:
Rodrigo Pinto 2024-11-29 17:22:29 -03:00
commit 70a92cb0e6
7 changed files with 75 additions and 236 deletions

View file

@ -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()