diff --git a/.changeset/slow-mirrors-eat.md b/.changeset/slow-mirrors-eat.md new file mode 100644 index 0000000000..6996a977d0 --- /dev/null +++ b/.changeset/slow-mirrors-eat.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': patch +--- + +Fix GitLab provider setup so that it supports GitLab installations with a path in the URL. diff --git a/plugins/auth-backend/src/providers/gitlab/provider.ts b/plugins/auth-backend/src/providers/gitlab/provider.ts index 7f5489d391..31efafa4ee 100644 --- a/plugins/auth-backend/src/providers/gitlab/provider.ts +++ b/plugins/auth-backend/src/providers/gitlab/provider.ts @@ -91,6 +91,9 @@ export class GitlabAuthProvider implements OAuthHandlers { clientSecret: options.clientSecret, callbackURL: options.callbackUrl, baseURL: options.baseUrl, + authorizationURL: `${options.baseUrl}/oauth/authorize`, + tokenURL: `${options.baseUrl}/oauth/token`, + profileURL: `${options.baseUrl}/api/v4/user`, }, ( accessToken: any,