diff options
| author | Adam Soltys <[email protected]> | 2020-05-18 22:33:28 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-05-18 22:33:28 -0700 |
| commit | 59b39a34e0919b6b31db5281b3cd2977312249e9 (patch) | |
| tree | 614869f5fa8c9550c5b4b82b9c2874690ef2c45e | |
| parent | 32f85a740f22460c4be8a79b7aeb0dfba0071689 (diff) | |
| download | coinos-server-59b39a34e0919b6b31db5281b3cd2977312249e9.tar.gz coinos-server-59b39a34e0919b6b31db5281b3cd2977312249e9.zip | |
fix twofa disable
| -rw-r--r-- | routes/users.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routes/users.js b/routes/users.js index 10eec095..ea96764b 100644 --- a/routes/users.js +++ b/routes/users.js @@ -15,8 +15,8 @@ const twofa = (req, res, next) => { } = req; if ( user.twofa && - (typeof twofa === "undefined" || - !authenticator.check(twofa, user.otpsecret)) + (typeof token === "undefined" || + !authenticator.check(token, user.otpsecret)) ) { return res.status(401).send("2fa required"); } else next(); |
