From 521f90a603d5c773b55672f91262cd92f692054f Mon Sep 17 00:00:00 2001 From: DacongDA Date: Sat, 17 May 2025 18:53:38 +0800 Subject: [PATCH] feat: fix access_token endpoint cannot read clientId in form when using device code flow (#3800) --- controllers/token.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/controllers/token.go b/controllers/token.go index 3b90f802..6e74c836 100644 --- a/controllers/token.go +++ b/controllers/token.go @@ -177,10 +177,6 @@ func (c *ApiController) GetOAuthToken() { clientId, clientSecret, _ = c.Ctx.Request.BasicAuth() } - if grantType == "urn:ietf:params:oauth:grant-type:device_code" { - clientId, clientSecret, _ = c.Ctx.Request.BasicAuth() - } - if len(c.Ctx.Input.RequestBody) != 0 && grantType != "urn:ietf:params:oauth:grant-type:device_code" { // If clientId is empty, try to read data from RequestBody var tokenRequest TokenRequest