fix(auth): expire stale MFA forms before accepting codes
This commit is contained in:
1 parent
298e34ef2e
commit
0c77de93b4
8 files changed
+82
-11
No files matched your search
@@ -863,6 +863,7 @@ describe("authentication engine", () => {
|
||||
requires: { mfa: ["totp"] },
|
||||
});
|
||||
expect(await engine.beginMfaOtp(firstLogin.mfaToken!, "email-otp")).toBeUndefined();
|
||||
expect(firstLogin.mfaExpiresAt).toBe(now() + 5 * 60_000);
|
||||
|
||||
expect((await engine.verifyEmail(verificationToken)).ok).toBe(true);
|
||||
const secondLogin = await engine.login({
|
||||
|
||||
Reference in new issue
Block a user