diff --git a/proto/tool.go b/proto/tool.go index 3d1108a..3c1df5e 100644 --- a/proto/tool.go +++ b/proto/tool.go @@ -332,7 +332,7 @@ type GiteaOAuthRequest struct { ClientSecret string `json:"client_secret"` Code string `json:"code"` RedirectURI string `json:"redirect_uri"` - Scope string `json:"scope"` + GrantType string `json:"grant_type"` // authorization_code } type GiteaUserInfo struct { Sub string `json:"sub"` diff --git a/worker/thirdParty.go b/worker/thirdParty.go index 088b75c..f1d8509 100644 --- a/worker/thirdParty.go +++ b/worker/thirdParty.go @@ -534,7 +534,7 @@ func GetGiteaAccessTokenByCode(baseUrl, code string, redirectURI string, clientI ClientSecret: clientSecret, Code: code, RedirectURI: redirectURI, - Scope: "user", + GrantType: "authorization_code", } reqData, err := json.Marshal(req)