Merge pull request #4204 from rackerlabs/fix-device-code-response

fix: device code pending HTTP response
This commit is contained in:
Márk Sági-Kazár
2025-07-29 15:55:49 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -255,7 +255,7 @@ func (s *Server) handleDeviceToken(w http.ResponseWriter, r *http.Request) {
if slowDown {
s.tokenErrHelper(w, deviceTokenSlowDown, "", http.StatusBadRequest)
} else {
s.tokenErrHelper(w, deviceTokenPending, "", http.StatusUnauthorized)
s.tokenErrHelper(w, deviceTokenPending, "", http.StatusBadRequest)
}
case deviceTokenComplete:
codeChallengeFromStorage := deviceToken.PKCE.CodeChallenge
+1 -1
View File
@@ -467,7 +467,7 @@ func TestDeviceTokenResponse(t *testing.T) {
},
testDeviceCode: "f00bar",
expectedServerResponse: deviceTokenPending,
expectedResponseCode: http.StatusUnauthorized,
expectedResponseCode: http.StatusBadRequest,
},
{
testName: "Invalid Grant Type",