From b3ca78f4ae0a527609e9e803f378d4d26a4cb9e1 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Tue, 23 May 2023 21:38:18 +0000 Subject: [PATCH 1/2] Add custom copy for google oauth provider --- src/lib/stores/oauth-providers.ts | 2 + .../project-[project]/auth/googleOAuth.svelte | 82 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 src/routes/console/project-[project]/auth/googleOAuth.svelte diff --git a/src/lib/stores/oauth-providers.ts b/src/lib/stores/oauth-providers.ts index 8047d6bdb3..40bcff26ab 100644 --- a/src/lib/stores/oauth-providers.ts +++ b/src/lib/stores/oauth-providers.ts @@ -7,6 +7,7 @@ import Okta from '../../routes/console/project-[project]/auth/oktaOAuth.svelte'; import Auth0 from '../../routes/console/project-[project]/auth/auth0OAuth.svelte'; import Authentik from '../../routes/console/project-[project]/auth/authentikOAuth.svelte'; import GitLab from '../../routes/console/project-[project]/auth/gitlabOAuth.svelte'; +import Google from '../../routes/console/project-[project]/auth/googleOAuth.svelte'; import Main from '../../routes/console/project-[project]/auth/mainOAuth.svelte'; export type Provider = Models.Provider & { @@ -81,6 +82,7 @@ const setProviders = (project: Models.Project): Provider[] => { break; case 'google': docs = 'https://support.google.com/googleapi/answer/6158849'; + component = Google; break; case 'linkedin': docs = 'https://developer.linkedin.com/'; diff --git a/src/routes/console/project-[project]/auth/googleOAuth.svelte b/src/routes/console/project-[project]/auth/googleOAuth.svelte new file mode 100644 index 0000000000..1b4d3c9860 --- /dev/null +++ b/src/routes/console/project-[project]/auth/googleOAuth.svelte @@ -0,0 +1,82 @@ + + + + {provider.name} OAuth2 Settings + +

+ To use {provider.name} authentication in your application, first fill in this form. For more + info you can + visit the docs. +

+ + + + + To complete set up, add this OAuth2 redirect URI to your {provider.name} app configuration + and select web application as the application type. + +
+

URI

+ +
+
+ + + + +
From 35c33066af971d78b515b47aae6f44e631d613c1 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Fri, 2 Jun 2023 17:53:45 +0000 Subject: [PATCH 2/2] update instruction ordering --- src/routes/console/project-[project]/auth/googleOAuth.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/console/project-[project]/auth/googleOAuth.svelte b/src/routes/console/project-[project]/auth/googleOAuth.svelte index 1b4d3c9860..c8fd0390bc 100644 --- a/src/routes/console/project-[project]/auth/googleOAuth.svelte +++ b/src/routes/console/project-[project]/auth/googleOAuth.svelte @@ -58,8 +58,8 @@ showPasswordButton bind:value={secret} /> - To complete set up, add this OAuth2 redirect URI to your {provider.name} app configuration - and select web application as the application type. + To complete the setup, create an OAuth2 client ID with "Web application" as the + application type, then add this redirect URI to your {provider.name} configuration.

URI