Merge pull request #5303 from 7heMech/fix-2fa-logout

Add guardrail to fix disabling 2fa
This commit is contained in:
jc21 authored and GitHub committed 2026-02-16 10:27:58 +10:00
commit f3c46487f6
1 file changed
+6 -3
+6 -3
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");