feat: release authentication diagnostics 0.2.0
This commit is contained in:
@@ -58,4 +58,15 @@ describe("otpauth profiles", () => {
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
it("round-trips a diagnostic RFC 6238 T0 with a portability warning", () => {
|
||||
const result = parseOtpAuth(
|
||||
"otpauth://totp/Example?secret=JBSWY3DPEHPK3PXP&t0=1234",
|
||||
);
|
||||
expect(result.profile.epoch).toBe(1234);
|
||||
expect(
|
||||
result.warnings.some(({ code }) => code === "nonstandard-epoch"),
|
||||
).toBe(true);
|
||||
expect(serializeOtpAuth(result.profile)).toContain("t0=1234");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user