diff --git a/main.go b/main.go index d53f8d3872456a4f1d496b3a7c07f3b27714d5d2..8930fddaa8bec5bc1922712cedcb20e5aef24da9 100644 --- a/main.go +++ b/main.go @@ -389,10 +389,9 @@ func main() { data.Set("client_id", clientId) data.Set("client_secret", clientSecret) data.Set("grant_type", grantType) - if code != "" { + if grantType == "authorization_code" { data.Set("code", code) - } - if scope != "" { + } else { data.Set("scope", scope) }