mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-22 18:25:47 +08:00
feat: fix access_token endpoint cannot read clientId in form when using device code flow (#3800)
This commit is contained in:
parent
4260efcfd0
commit
521f90a603
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user