better comment for why we delete totpSecret from the body

This commit is contained in:
alex-phillips 2020-02-22 13:50:44 -05:00
parent ac69aba621
commit 8a899a1701

View File

@ -114,7 +114,10 @@ router.put('/', upload.single('avatar'), async (req, res, next) => {
delete req.body.password
}
// ALWAYS DELETE totp, this should only be set by the server
/**
* This is just a security precaution.
* ALWAYS DELETE totp, this should only be set by the server.
*/
delete req.body.totpSecret
// Begin process to set up and confirm multi-factor authentication