From 3e0f0c02850b3f1e75400644252cc9d5edaf33a7 Mon Sep 17 00:00:00 2001 From: ahmed Date: Mon, 26 Sep 2022 22:02:22 +0200 Subject: [PATCH 1/4] oauth: consider hosted gitlab with relative path Signed-off-by: ahmed --- plugins/auth-backend/src/providers/gitlab/provider.ts | 3 +++ 1 file changed, 3 insertions(+) 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, From 8c6ec175bf814faea25ce7113643cadd6bd9ceea Mon Sep 17 00:00:00 2001 From: ahmed Date: Mon, 26 Sep 2022 22:09:38 +0200 Subject: [PATCH 2/4] changeset Signed-off-by: ahmed --- .changeset/slow-mirrors-eat.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/slow-mirrors-eat.md diff --git a/.changeset/slow-mirrors-eat.md b/.changeset/slow-mirrors-eat.md new file mode 100644 index 0000000000..59e0c38484 --- /dev/null +++ b/.changeset/slow-mirrors-eat.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': patch +--- + +oauth callbacks to consider installations with relative_url From 35bac0dbf1113c37da9404fc7ce54303f6c0bcd8 Mon Sep 17 00:00:00 2001 From: ahmed Date: Mon, 26 Sep 2022 22:12:56 +0200 Subject: [PATCH 3/4] make docs happy Signed-off-by: ahmed --- .changeset/slow-mirrors-eat.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/slow-mirrors-eat.md b/.changeset/slow-mirrors-eat.md index 59e0c38484..5a71095820 100644 --- a/.changeset/slow-mirrors-eat.md +++ b/.changeset/slow-mirrors-eat.md @@ -2,4 +2,4 @@ '@backstage/plugin-auth-backend': patch --- -oauth callbacks to consider installations with relative_url +oauth callbacks to consider installations with relative URL. From f0f34a493cf0fb051cd5ee37d9d5e64e01f96a9c Mon Sep 17 00:00:00 2001 From: Ahmed Date: Tue, 27 Sep 2022 10:12:43 +0200 Subject: [PATCH 4/4] Update .changeset/slow-mirrors-eat.md Co-authored-by: Patrik Oldsberg Signed-off-by: Ahmed --- .changeset/slow-mirrors-eat.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/slow-mirrors-eat.md b/.changeset/slow-mirrors-eat.md index 5a71095820..6996a977d0 100644 --- a/.changeset/slow-mirrors-eat.md +++ b/.changeset/slow-mirrors-eat.md @@ -2,4 +2,4 @@ '@backstage/plugin-auth-backend': patch --- -oauth callbacks to consider installations with relative URL. +Fix GitLab provider setup so that it supports GitLab installations with a path in the URL.