diff options
| author | Adam Soltys <[email protected]> | 2025-03-11 12:48:34 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-03-11 12:48:34 -0700 |
| commit | 70d103470e3aaa9d127867571589cf3de8f23523 (patch) | |
| tree | 99e2e713d95ee283ee4eb5c0ac720478366fb901 | |
| parent | 3fb8e0bde1d8d3e9da9164dd0c208b32b9583de3 (diff) | |
| download | coinos-server-70d103470e3aaa9d127867571589cf3de8f23523.tar.gz coinos-server-70d103470e3aaa9d127867571589cf3de8f23523.zip | |
don't require 2fa for nostrlogin
| -rw-r--r-- | routes/payments.ts | 2 | ||||
| -rw-r--r-- | routes/users.ts | 8 |
2 files changed, 0 insertions, 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) }); |
