From 295a372946036e859ee2aa4adecb8dbc4a61927c Mon Sep 17 00:00:00 2001 From: pedrule Date: Thu, 1 Sep 2022 23:39:34 +0200 Subject: [PATCH] change rawquery to fix issue in query building --- consent/strategy_default.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/consent/strategy_default.go b/consent/strategy_default.go index 9ea5fa2de95..bf9c9f62562 100644 --- a/consent/strategy_default.go +++ b/consent/strategy_default.go @@ -230,14 +230,15 @@ func (s *DefaultStrategy) forwardAuthenticationRequest(w http.ResponseWriter, r // Generate the request URL iu := s.c.OAuth2AuthURL() - iu.RawQuery = r.URL.RawQuery // Identify requester type if _, ok := ar.(fosite.AuthorizeRequester); ok { iu = s.c.OAuth2AuthURL() - } else if _, ok := ar.(*fosite.DeviceAuthorizeRequest); ok { + } + if _, ok := ar.(*fosite.DeviceAuthorizeRequest); ok { iu = s.c.OAuth2DeviceAuthURL() } + iu.RawQuery = r.URL.RawQuery var idTokenHintClaims jwtgo.MapClaims if idTokenHint := ar.GetRequestForm().Get("id_token_hint"); len(idTokenHint) > 0 {