Skip to content

Commit

Permalink
Reduce log level on TOTP failures (#42151)
Browse files Browse the repository at this point in the history
  • Loading branch information
codingllama authored Jun 3, 2024
1 parent bbc36cf commit 085ebe4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/auth/password.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 085ebe4

Please sign in to comment.