From 220f123b29528acf0e9ab5c9032e48a4bc83e2cc Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 7 Sep 2022 09:53:07 +0200 Subject: [PATCH] internal: add more tracing for states Signed-off-by: Jens Langhammer --- internal/outpost/proxyv2/application/oauth_callback.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/outpost/proxyv2/application/oauth_callback.go b/internal/outpost/proxyv2/application/oauth_callback.go index 1ae8681ef..eff50120b 100644 --- a/internal/outpost/proxyv2/application/oauth_callback.go +++ b/internal/outpost/proxyv2/application/oauth_callback.go @@ -5,6 +5,7 @@ import ( "fmt" "net/http" + log "github.com/sirupsen/logrus" "golang.org/x/oauth2" ) @@ -19,6 +20,11 @@ func (a *Application) redeemCallback(r *http.Request, states []string) (*Claims, found = true } } + a.log.WithFields(log.Fields{ + "states": states, + "expected": state, + "found": found, + }).Trace("tracing states") if !found { return nil, fmt.Errorf("invalid state") }