From e5251b604f67bda44db3da43135fc5f9aa1cae03 Mon Sep 17 00:00:00 2001 From: alex-phillips Date: Wed, 26 Feb 2020 08:38:41 -0500 Subject: [PATCH] adjusted length again - length is the value for the ASCII version, not the base32 version --- routes/users.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/users.js b/routes/users.js index cc37abc..95a2212 100644 --- a/routes/users.js +++ b/routes/users.js @@ -137,7 +137,7 @@ router.put('/:id', upload.single('avatar'), async (req, res, next) => { // Begin process to set up and confirm multi-factor authentication if (user.multifactorEnabled === false && !!req.body.multifactorEnabled === true) { - const secret = Speakeasy.generateSecret({ length: 16 }) + const secret = Speakeasy.generateSecret({ length: 10 }) const qrcode = await QRCode.toDataURL(secret.otpauth_url, { scale: 6 }) user.update({