From 70d103470e3aaa9d127867571589cf3de8f23523 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 11 Mar 2025 12:48:34 -0700 Subject: don't require 2fa for nostrlogin --- routes/payments.ts | 2 -- routes/users.ts | 8 -------- 2 files changed, 10 deletions(-) diff --git a/routes/payments.ts b/routes/payments.ts index 2e0a5030..4d1c55c5 100644 --- a/routes/payments.ts +++ b/routes/payments.ts @@ -247,7 +247,6 @@ export default { const { params: { name }, } = req; - fail("disabled"); const balance = await g(`fund:${name}`); res.send({ tag: "withdrawRequest", @@ -265,7 +264,6 @@ export default { user, } = req; try { - fail("disabled"); const { id: uid } = user; amount = parseInt(amount); if (amount < 0) fail("Invalid amount"); diff --git a/routes/users.ts b/routes/users.ts index 4bce1bb4..6e4c98dd 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -373,14 +373,6 @@ export default { const { username } = user; l("logging in", username, ip); - if ( - user.twofa && - (typeof twofa === "undefined" || - !authenticator.check(twofa, user.otpsecret)) - ) { - return res.code(401).send("2fa required"); - } - const payload = { id: user.id }; const token = jwt.sign(payload, config.jwt); res.cookie("token", token, { expires: new Date(Date.now() + 432000000) }); -- cgit v1.2.3