Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: update OAuth2 templates (#4525)

boojack6dac41b0bb99
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 3ecbcbb427..136dbdc4de 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -403,7 +403,7 @@
},
"sso": {
"create": "Create SSO",
- "description": "Single sign-on (SSO) is an authentication method that enables users to authenticate with other applications and websites.",
+ "description": "Single sign-on (SSO) is an authentication method that enables users to sign in to multiple applications and websites with a single set of credentials.",
"deletion": "Delete this SSO",
"form": {
"callback-url": "Authorization callback url",
diff --git a/frontend/src/utils/idp.ts b/frontend/src/utils/idp.ts
index 59b9e7c10a..e4daded8b0 100644
--- a/frontend/src/utils/idp.ts
+++ b/frontend/src/utils/idp.ts
@@ -26,36 +26,14 @@ interface OAuth2IdentityProviderTemplate {
export type IdentityProviderTemplate = OAuth2IdentityProviderTemplate;
export const identityProviderTemplateList: IdentityProviderTemplate[] = [
- {
- title: "Google",
- name: "idp-google",
- domain: "google.com",
- type: IdentityProviderType.OAUTH2,
- config: {
- clientId: "YOUR_CLIENT_ID",
- clientSecret: "YOUR_CLIENT_SECRET",
- authUrl: "https://accounts.google.com/o/oauth2/v2/auth",
- tokenUrl: "https://oauth2.googleapis.com/token",
- userInfoUrl: "https://www.googleapis.com/oauth2/v2/userinfo",
- scopes: [
- "https://www.googleapis.com/auth/userinfo.email",
- "https://www.googleapis.com/auth/userinfo.profile",
- ],
- fieldMapping: {
- identifier: "email",
- displayName: "name",
- email: "email",
- },
- },
- },
{
title: "GitHub",
- name: "idp-github",
+ name: "",
domain: "github.com",
type: IdentityProviderType.OAUTH2,
config: {
- clientId: "YOUR_CLIENT_ID",
- clientSecret: "YOUR_CLIENT_SECRET",
+ clientId: "",
+ clientSecret: "",
authUrl: "https://github.com/login/oauth/authorize",
tokenUrl: "https://github.com/login/oauth/access_token",
userInfoUrl: "https://api.github.com/user",
@@ -69,12 +47,12 @@ export const identityProviderTemplateList: IdentityProviderTemplate[] = [
},
{
title: "GitLab",
- name: "idp-gitlab",
+ name: "",
domain: "gitlab.com",
type: IdentityProviderType.OAUTH2,
config: {
- clientId: "YOUR_CLIENT_ID",
- clientSecret: "YOUR_CLIENT_SECRET",
+ clientId: "",
+ clientSecret: "",
authUrl: "https://gitlab.com/oauth/authorize",
tokenUrl: "https://gitlab.com/oauth/token",
userInfoUrl: "https://gitlab.com/api/v4/user",
@@ -86,4 +64,45 @@ export const identityProviderTemplateList: IdentityProviderTemplate[] = [
},
},
},
+ {
+ title: "Google",
+ name: "",
+ domain: "google.com",
+ type: IdentityProviderType.OAUTH2,
+ config: {
+ clientId: "",
+ clientSecret: "",
+ authUrl: "https://accounts.google.com/o/oauth2/v2/auth",
+ tokenUrl: "https://oauth2.googleapis.com/token",
+ userInfoUrl: "https://www.googleapis.com/oauth2/v2/userinfo",
+ scopes: [
+ "https://www.googleapis.com/auth/userinfo.email",
+ "https://www.googleapis.com/auth/userinfo.profile",
+ ],
+ fieldMapping: {
+ identifier: "email",
+ displayName: "name",
+ email: "email",
+ },
+ },
+ },
+ {
+ title: "Custom",
+ name: "",
+ domain: "",
+ type: IdentityProviderType.OAUTH2,
+ config: {
+ clientId: "",
+ clientSecret: "",
+ authUrl: "",
+ tokenUrl: "",
+ userInfoUrl: "",
+ scopes: [],
+ fieldMapping: {
+ identifier: "",
+ displayName: "",
+ email: "",
+ },
+ },
+ },
];
diff --git a/frontend/src/utils/sso.ts b/frontend/src/utils/sso.ts
index 8cbd1f26d3..f6a8119f9a 100644
--- a/frontend/src/utils/sso.ts
+++ b/frontend/src/utils/sso.ts
@@ -34,6 +34,4 @@ export function openWindowForSSO(
`identity provider type ${identityProvider.type.toString()} is not supported`
);
}
-
- return null;
}
diff --git a/frontend/src/views/SettingWorkspaceSSO.vue b/frontend/src/views/SettingWorkspaceSSO.vue
index 10a3950fe7..01eb4273a4 100644
--- a/frontend/src/views/SettingWorkspaceSSO.vue
+++ b/frontend/src/views/SettingWorkspaceSSO.vue
@@ -1,7 +1,7 @@
<template>
<div class="w-full mt-4 space-y-4">
<div class="w-full flex flex-row justify-between items-center">
- <div class="textinfolabel max-w-xl">
+ <div class="textinfolabel mr-4">
{{ $t("settings.sso.description") }}
</div>
<div>