diff --git a/internal/server.go b/internal/server.go index efbaf612..cbbfb4c6 100644 --- a/internal/server.go +++ b/internal/server.go @@ -109,12 +109,12 @@ func (s *Server) AuthHandler(providerName, rule string) http.HandlerFunc { if !valid { logger.WithField("email", email).Warn("Invalid email") - if config.LogoutIfInvalidEmail == true { + if config.LogoutIfInvalidEmail { // The email address isn't valid so display an error and clear the cookie // Clearing the cookie will allow the user to try another email address and avoid being trapped on 'Not authorized' http.SetCookie(w, ClearCookie(r)) http.Error(w, "Not authorized (Refresh to try again with a different email address)", 401) - }else { + } else { http.Error(w, "Not authorized", 401) } return