@@ -63,7 +63,7 @@ func (p *GitHubProvider) hasOrg(accessToken string) (bool, error) {
63 "limit": {"100"},
63 "limit": {"100"},
66− endpoint := "https://api.github.com/user/orgs?" + params.Encode()
66+ endpoint := p.ValidateURL.Scheme + "://" + p.ValidateURL.Host + "/user/orgs?" + params.Encode()
67 req, _ := http.NewRequest("GET", endpoint, nil)
67 req, _ := http.NewRequest("GET", endpoint, nil)
68 req.Header.Set("Accept", "application/vnd.github.v3+json")
68 req.Header.Set("Accept", "application/vnd.github.v3+json")
69 resp, err := http.DefaultClient.Do(req)
69 resp, err := http.DefaultClient.Do(req)
@@ -113,7 +113,7 @@ func (p *GitHubProvider) hasOrgAndTeam(accessToken string) (bool, error) {
113 "limit": {"100"},
113 "limit": {"100"},
116− endpoint := "https://api.github.com/user/teams?" + params.Encode()
116+ endpoint := p.ValidateURL.Scheme + "://" + p.ValidateURL.Host + "/user/teams?" + params.Encode()
117 req, _ := http.NewRequest("GET", endpoint, nil)
117 req, _ := http.NewRequest("GET", endpoint, nil)
118 req.Header.Set("Accept", "application/vnd.github.v3+json")
118 req.Header.Set("Accept", "application/vnd.github.v3+json")
119 resp, err := http.DefaultClient.Do(req)
119 resp, err := http.DefaultClient.Do(req)
@@ -183,7 +183,7 @@ func (p *GitHubProvider) GetEmailAddress(s *SessionState) (string, error) {
183 params := url.Values{
183 params := url.Values{
184 "access_token": {s.AccessToken},
184 "access_token": {s.AccessToken},
186− endpoint := "https://api.github.com/user/emails?" + params.Encode()
186+ endpoint := p.ValidateURL.Scheme + "://" + p.ValidateURL.Host + p.ValidateURL.Path + "?" + params.Encode()
187 resp, err := http.DefaultClient.Get(endpoint)
187 resp, err := http.DefaultClient.Get(endpoint)
188 if err != nil {
188 if err != nil {
189 return "", err
189 return "", err