From 008d6a0c817f5a6d34ce6e86a41a45c4e7aad9cb Mon Sep 17 00:00:00 2001 From: kimw Date: Tue, 7 Mar 2023 19:35:31 +0800 Subject: [PATCH] feat: add GitLab OAuth2 template (#1302) --- .../CreateIdentityProviderDialog.tsx | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/web/src/components/CreateIdentityProviderDialog.tsx b/web/src/components/CreateIdentityProviderDialog.tsx index 7bbd423e..adc09bbb 100644 --- a/web/src/components/CreateIdentityProviderDialog.tsx +++ b/web/src/components/CreateIdentityProviderDialog.tsx @@ -34,6 +34,27 @@ const templateList: IdentityProvider[] = [ }, }, }, + { + id: UNKNOWN_ID, + name: "GitLab", + type: "OAUTH2", + identifierFilter: "", + config: { + oauth2Config: { + clientId: "", + clientSecret: "", + authUrl: "https://gitlab.com/oauth/authorize", + tokenUrl: "https://gitlab.com/oauth/token", + userInfoUrl: "https://gitlab.com/oauth/userinfo", + scopes: ["openid"], + fieldMapping: { + identifier: "name", + displayName: "name", + email: "email", + }, + }, + }, + }, { id: UNKNOWN_ID, name: "Google",