From a0cf8b2dc2dac9ee72488de5e38fc8a79c184c00 Mon Sep 17 00:00:00 2001
From: MM53 <28218664+MM53@users.noreply.github.com>
Date: Tue, 13 Feb 2024 21:10:41 +0100
Subject: [PATCH] fix: Do not evaluate skipApproval on approval page (#3086)

Signed-off-by: MM53 <28218664+MM53@users.noreply.github.com>
---
 server/handlers.go | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/server/handlers.go b/server/handlers.go
index 58366a88..b35e25e9 100644
--- a/server/handlers.go
+++ b/server/handlers.go
@@ -628,12 +628,6 @@ func (s *Server) handleApproval(w http.ResponseWriter, r *http.Request) {
 
 	switch r.Method {
 	case http.MethodGet:
-		// TODO: `finalizeLogin()` now sends code directly to client without going through this endpoint,
-		//		 the `if skipApproval { ... }` block needs to be removed after a grace period.
-		if s.skipApproval {
-			s.sendCodeResponse(w, r, authReq)
-			return
-		}
 		client, err := s.storage.GetClient(authReq.ClientID)
 		if err != nil {
 			s.logger.Errorf("Failed to get client %q: %v", authReq.ClientID, err)
-- 
GitLab