Skip to content

Commit

Permalink
fix: remove trailing / in github oauth2 callback url
Browse files Browse the repository at this point in the history
Signed-off-by: Stefano Cappa <[email protected]>
  • Loading branch information
Ks89 committed Aug 20, 2024
1 parent c6fa3a3 commit e3a6489
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions initialization/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
limits "github.com/gin-contrib/size"
"github.com/gin-gonic/contrib/gzip"
"github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10"
"go.mongodb.org/mongo-driver/mongo"
"go.uber.org/zap"
"golang.org/x/net/context"
Expand All @@ -34,7 +33,7 @@ var oauthScopes = []string{"repo"} //https://developer.github.com/v3/oauth/#scop
// SetupRouter function
func SetupRouter(httpOrigin string, logger *zap.SugaredLogger) (*gin.Engine, cookie.Store) {
// init oauthCallbackURL based on httpOrigin
oauthCallbackURL = httpOrigin + "/api/callback/"
oauthCallbackURL = httpOrigin + "/api/callback"

// init GIN
router := gin.Default()
Expand Down

0 comments on commit e3a6489

Please sign in to comment.