修改gitea第三方登录包含官方及我自部署请求token问题
This commit is contained in:
parent
7f8138e654
commit
d1f3eb8696
|
|
@ -332,7 +332,7 @@ type GiteaOAuthRequest struct {
|
||||||
ClientSecret string `json:"client_secret"`
|
ClientSecret string `json:"client_secret"`
|
||||||
Code string `json:"code"`
|
Code string `json:"code"`
|
||||||
RedirectURI string `json:"redirect_uri"`
|
RedirectURI string `json:"redirect_uri"`
|
||||||
Scope string `json:"scope"`
|
GrantType string `json:"grant_type"` // authorization_code
|
||||||
}
|
}
|
||||||
type GiteaUserInfo struct {
|
type GiteaUserInfo struct {
|
||||||
Sub string `json:"sub"`
|
Sub string `json:"sub"`
|
||||||
|
|
|
||||||
|
|
@ -534,7 +534,7 @@ func GetGiteaAccessTokenByCode(baseUrl, code string, redirectURI string, clientI
|
||||||
ClientSecret: clientSecret,
|
ClientSecret: clientSecret,
|
||||||
Code: code,
|
Code: code,
|
||||||
RedirectURI: redirectURI,
|
RedirectURI: redirectURI,
|
||||||
Scope: "user",
|
GrantType: "authorization_code",
|
||||||
}
|
}
|
||||||
reqData, err := json.Marshal(req)
|
reqData, err := json.Marshal(req)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue