修改gitea第三方登录包含官方及我自部署请求token问题
This commit is contained in:
parent
7f8138e654
commit
d1f3eb8696
|
|
@ -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"`
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue