mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-24 02:41:01 +00:00
Merge pull request #407 from floatdrop/patch-1
0.3, Forming right redirect url for enterprise
This commit is contained in:
commit
30767bdfa7
1 changed files with 1 additions and 1 deletions
|
@ -142,7 +142,7 @@ func (g *Github) GetPullRequestHook(r *http.Request) (*remote.Hook, error) {
|
|||
func (g *Github) GetLogin(w http.ResponseWriter, r *http.Request) (*remote.Login, error) {
|
||||
// create the oauth2 client
|
||||
oauth := oauth2.Client{
|
||||
RedirectURL: fmt.Sprintf("%s://%s/login/github.com", httputil.GetScheme(r), httputil.GetHost(r)),
|
||||
RedirectURL: fmt.Sprintf("%s://%s/login/%s", httputil.GetScheme(r), httputil.GetHost(r), g.GetName()),
|
||||
AccessTokenURL: fmt.Sprintf("%s/login/oauth/access_token", g.URL),
|
||||
AuthorizationURL: fmt.Sprintf("%s/login/oauth/authorize", g.URL),
|
||||
ClientId: g.Client,
|
||||
|
|
Loading…
Reference in a new issue