Skip to content

Commit

Permalink
Merge pull request #2920 from cmj0121/master
Browse files Browse the repository at this point in the history
Fix bug when refresh gitea access token
  • Loading branch information
bradrydzewski committed Mar 9, 2020
2 parents 296471d + 74423bf commit 6b6ea73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/drone-server/inject_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/drone/go-login/login/gogs"
"github.com/drone/go-login/login/stash"
"github.com/drone/go-scm/scm/transport/oauth2"
"strings"

"github.com/google/wire"
"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -169,7 +170,7 @@ func provideRefresher(config config.Config) *oauth2.Refresher {
return &oauth2.Refresher{
ClientID: config.Gitea.ClientID,
ClientSecret: config.Gitea.ClientSecret,
Endpoint: config.Gitea.Server + "/login/oauth/access_token",
Endpoint: strings.TrimSuffix(config.Gitea.Server, "/") + "/login/oauth/access_token",
Source: oauth2.ContextTokenSource(),
Client: defaultClient(config.Gitea.SkipVerify),
}
Expand Down

0 comments on commit 6b6ea73

Please sign in to comment.