adjusted length of totp secret in case someone has to manually type it in

This commit is contained in:
alex-phillips 2020-02-26 08:34:02 -05:00
parent 214b46effc
commit fceff42eba

View File

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