fix: use server address as redirect url

This commit is contained in:
ckt1031 2023-07-28 14:55:40 +08:00
parent 438daea433
commit 0c70181f81

View File

@ -35,8 +35,8 @@ func getGoogleUserInfoByCode(codeFromURLParamaters string, host string) (*Google
RequestClient := &http.Client{}
accessTokenBody := bytes.NewBuffer([]byte(fmt.Sprintf(
"code=%s&client_id=%s&client_secret=%s&redirect_uri=https://%s/oauth/google&grant_type=authorization_code",
codeFromURLParamaters, common.GoogleClientId, common.GoogleClientSecret, host,
"code=%s&client_id=%s&client_secret=%s&redirect_uri=%s/oauth/google&grant_type=authorization_code",
codeFromURLParamaters, common.GoogleClientId, common.GoogleClientSecret, common.ServerAddress,
)))
req, _ := http.NewRequest("POST",