From dcdca19caee87b32c086abb68629f243d267f3ff Mon Sep 17 00:00:00 2001 From: DL6ER Date: Fri, 10 Nov 2023 04:48:07 +0100 Subject: [PATCH] Move 2FA success message more human-readable and move it to debug printing Signed-off-by: DL6ER --- src/api/2fa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/2fa.c b/src/api/2fa.c index 6988592f..4e255df2 100644 --- a/src/api/2fa.c +++ b/src/api/2fa.c @@ -230,7 +230,8 @@ enum totp_status verifyTOTP(const uint32_t incode) i, gencode, (unsigned long)(RFC6238_X - (now % RFC6238_X))); return TOTP_REUSED; } - log_info("2FA code verified successfully at %i", i); + const char *which = i == -1 ? "previous" : i == 0 ? "current" : "next"; + log_debug(DEBUG_API, "2FA code from %s time step is valid", which); last_code = gencode; return TOTP_CORRECT; }