This commit is contained in:
“xHuPo” 2025-06-17 14:44:48 +08:00
parent 17a02ea47e
commit 70e7a113e6
22 changed files with 967 additions and 285 deletions

View file

@ -40,7 +40,7 @@ async function generateOTP(type, secret, options = {}) {
...options,
...(parsed.type === 'totp' ? { period: parsed.period } : {}),
...(parsed.type === 'hotp' ? { counter: parsed.counter } : {}),
algorithm: parsed.algo,
algorithm: parsed.algorithm,
digits: parsed.digits
});
}
@ -85,7 +85,7 @@ async function verifyOTP(token, type, secret, options = {}) {
...options,
...(parsed.type === 'totp' ? { period: parsed.period } : {}),
...(parsed.type === 'hotp' ? { counter: parsed.counter } : {}),
algorithm: parsed.algo,
algorithm: parsed.algorithm,
digits: parsed.digits
});
}