Skip to content

Commit

Permalink
Improve error message when TOPT is not valid
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbattirola authored and russjones committed Dec 10, 2021
1 parent d2a55b6 commit e8f3b54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/auth/password.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func (s *Server) checkTOTP(ctx context.Context, user, otpToken string, dev *type
return trace.AccessDenied("failed to validate TOTP code: %v", err)
}
if !valid {
return trace.AccessDenied("TOTP code not valid")
return trace.AccessDenied("invalid one time token, please check if the token has expired and try again")
}
// if we have a valid token, update the previously used token
if err := s.UpsertUsedTOTPToken(user, otpToken); err != nil {
Expand Down

0 comments on commit e8f3b54

Please sign in to comment.