diff --git a/routes/users.js b/routes/users.js index 817351d..28855b6 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() + const secret = Speakeasy.generateSecret({ length: 16 }) const qrcode = await QRCode.toDataURL(secret.otpauth_url, { scale: 6 }) user.update({