@@ -63,7 +63,7 @@ func (p *GitHubProvider) hasOrg(accessToken string) (bool, error) {
6363 "limit": {"100"},
6464 }
6565
66− endpoint := "https://api.github.com/user/orgs?" + params.Encode()
66+ endpoint := p.ValidateURL.Scheme + "://" + p.ValidateURL.Host + "/user/orgs?" + params.Encode()
6767 req, _ := http.NewRequest("GET", endpoint, nil)
6868 req.Header.Set("Accept", "application/vnd.github.v3+json")
6969 resp, err := http.DefaultClient.Do(req)
@@ -113,7 +113,7 @@ func (p *GitHubProvider) hasOrgAndTeam(accessToken string) (bool, error) {
113113 "limit": {"100"},
114114 }
115115
116− endpoint := "https://api.github.com/user/teams?" + params.Encode()
116+ endpoint := p.ValidateURL.Scheme + "://" + p.ValidateURL.Host + "/user/teams?" + params.Encode()
117117 req, _ := http.NewRequest("GET", endpoint, nil)
118118 req.Header.Set("Accept", "application/vnd.github.v3+json")
119119 resp, err := http.DefaultClient.Do(req)
@@ -183,7 +183,7 @@ func (p *GitHubProvider) GetEmailAddress(s *SessionState) (string, error) {
183183 params := url.Values{
184184 "access_token": {s.AccessToken},
185185 }
186− endpoint := "https://api.github.com/user/emails?" + params.Encode()
186+ endpoint := p.ValidateURL.Scheme + "://" + p.ValidateURL.Host + p.ValidateURL.Path + "?" + params.Encode()
187187 resp, err := http.DefaultClient.Get(endpoint)
188188 if err != nil {
189189 return "", err