From 085ebe4d5c6bd1ec851fdf44ea30bb23dd13551e Mon Sep 17 00:00:00 2001 From: Alan Parra Date: Mon, 3 Jun 2024 11:29:20 -0300 Subject: [PATCH] Reduce log level on TOTP failures (#42151) --- lib/auth/password.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/auth/password.go b/lib/auth/password.go index 0ae0f44bbc886..ce340820fd080 100644 --- a/lib/auth/password.go +++ b/lib/auth/password.go @@ -263,7 +263,10 @@ func (a *Server) checkOTP(user string, otpToken string) (*types.MFADevice, error } if err := a.checkTOTP(ctx, user, otpToken, dev); err != nil { - log.WithError(err).Errorf("Using TOTP device %q", dev.GetName()) + log. + WithError(err). + WithField("device", dev.GetName()). + Debug("TOTP device failed verification. This is expected if the user has multiple TOTP devices.") continue } return dev, nil