Update hivegrid-cloud reference to latest main

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
davidandClaude Fable 5 committed 2026-07-08 16:15:37 +02:00
1 parent e98d38e716
commit 7b21524c86
3781 files changed
+373484 -225607

No files matched your search

@@ -122,6 +122,23 @@ describe("step-up.server", () => {
}
});
test("falls back to the wall clock when no timestamp is supplied for set or check", async () => {
const session = await createSession();
// No `now` → setMfaStepUpState stamps the current time...
const state = setMfaStepUpState(session, { userId: "admin-1", method: "totp" });
expect(typeof state.verifiedAt).toBe("string");
expect(Number.isNaN(Date.parse(state.verifiedAt))).toBe(false);
// ...and checkMfaStepUpState with no options compares against the current time.
const result = checkMfaStepUpState(session, "admin-1");
expect(result.verified).toBe(true);
if (result.verified) {
expect(result.ageMs).toBeGreaterThanOrEqual(0);
expect(result.ageMs).toBeLessThan(MFA_STEP_UP_MAX_AGE_MS);
}
});
test("clears existing MFA step-up state", async () => {
const session = await createSession();
setMfaStepUpState(session, { userId: "admin-1", method: "totp", now: new Date("2026-05-08T14:00:00.000Z") });