修改gitea第三方登录包含官方及我自部署请求token问题

This commit is contained in:
junleea 2025-05-17 15:49:25 +08:00
parent 7f8138e654
commit d1f3eb8696
2 changed files with 2 additions and 2 deletions

View File

@ -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"`

View File

@ -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)