Kaynağa Gözat

add token expiry to gitlab app oauth

Mohammed Nafees 4 yıl önce
ebeveyn
işleme
2d99529aa9

+ 1 - 0
api/server/handlers/oauth_callback/gitlab.go

@@ -84,6 +84,7 @@ func (p *OAuthCallbackGitlabHandler) ServeHTTP(w http.ResponseWriter, r *http.Re
 		SharedOAuthModel: integrations.SharedOAuthModel{
 			AccessToken:  []byte(token.AccessToken),
 			RefreshToken: []byte(token.RefreshToken),
+			Expiry:       token.Expiry,
 		},
 		UserID:        userID,
 		ProjectID:     projID,

+ 1 - 1
api/server/shared/commonutils/gitlab.go

@@ -15,6 +15,6 @@ func GetGitlabOAuthConf(conf *config.Config, giIntegration *ints.GitlabIntegrati
 			TokenURL: giIntegration.InstanceURL + "/oauth/token",
 		},
 		RedirectURL: conf.ServerConf.ServerURL + "/api/oauth/gitlab/callback",
-		Scopes:      []string{"api"},
+		Scopes:      []string{"api", "profile", "email"},
 	}
 }