Add guardrail for disable 2fa

This commit is contained in:
7heMech
2026-02-14 06:28:59 +00:00
parent 011191f645
commit 1d14f72ba5

View File

@@ -161,9 +161,12 @@ const internal2fa = {
} }
const result = await verify({ const result = await verify({
token: code, token: code,
secret: auth.meta.totp_secret, secret: auth.meta.totp_secret,
}); guardrails: createGuardrails({
MIN_SECRET_BYTES: 10,
}),
});
if (!result.valid) { if (!result.valid) {
throw new errs.AuthError("Invalid verification code"); throw new errs.AuthError("Invalid verification code");