From 0984d1d5e028f8b1960c59a573204c03dc4b72b1 Mon Sep 17 00:00:00 2001 From: Hugo <hnouts@grandlyon.com> Date: Wed, 23 Sep 2020 10:28:42 +0200 Subject: [PATCH] fix - checking grant_type --- main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index d53f8d3..8930fdd 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) } -- GitLab