Skip to content

Commit 1760e57

Browse files
committed
fix: default GitLab OAuth scope to "read_user" when unset
- Set the default OAuth scope to "read_user" for GitLab when no scopes are provided Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
1 parent 329321d commit 1760e57

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

03-oauth-mcp/oauth-server/provider_gitlab.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ func (g *GitLabProvider) GetAuthorizeURL(clientID, state, redirectURI, scopes, c
5858

5959
if scopes != "" {
6060
values.Set("scope", scopes)
61+
} else {
62+
// GitLab default scope
63+
values.Set("scope", "read_user")
6164
}
6265

6366
if codeChallenge != "" {

0 commit comments

Comments
 (0)