Fixes #2446 hotp otpauth uri validation (#2614)

This commit is contained in:
alleria173
2026-07-03 08:54:38 +00:00
committed by GitHub
parent 6f95a2e17d
commit 3104e6073f
3 changed files with 83 additions and 8 deletions
+2 -1
View File
@@ -605,8 +605,9 @@ Top Drawer`, {
it("Generate HOTP", () => {
const result = chef.generateHOTP("JBSWY3DPEHPK3PXP", {
name: "Account",
});
const expected = `URI: otpauth://hotp/?secret=JBSWY3DPEHPK3PXP&algorithm=SHA1&digits=6&counter=0
const expected = `URI: otpauth://hotp/Account?secret=JBSWY3DPEHPK3PXP&algorithm=SHA1&digits=6&counter=0
Password: 282760`;
assert.strictEqual(result.toString(), expected);