diff --git a/packages/backend-core/src/middleware/passport/datasource/google.ts b/packages/backend-core/src/middleware/passport/datasource/google.ts index 3e8306c296..7f5e7f0d90 100644 --- a/packages/backend-core/src/middleware/passport/datasource/google.ts +++ b/packages/backend-core/src/middleware/passport/datasource/google.ts @@ -88,7 +88,7 @@ export async function postAuth( } ) - ctx.redirect(`${baseUrl}/new?type=google&action=continue&id=${id}`) + ctx.redirect(`${baseUrl}/new?action=google_continue&id=${id}`) } )(ctx, next) } diff --git a/packages/builder/src/components/backend/DatasourceNavigator/modals/GoogleDatasourceConfigModal.svelte b/packages/builder/src/components/backend/DatasourceNavigator/modals/GoogleDatasourceConfigModal.svelte index 6388cfb7b5..79fb0f6b5b 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/modals/GoogleDatasourceConfigModal.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/modals/GoogleDatasourceConfigModal.svelte @@ -1,43 +1,55 @@ - - {#if isGoogleConfigured === true} - + {#if step === GoogleDatasouceConfigStep.AUTH} + + {#if isGoogleConfigured === true} + + Authenticate with your google account to use the {integrationName} integration. + + + {:else if isGoogleConfigured === false} Authenticate with your google account to use the {IntegrationNames[ - datasource.type - ]} integration.Google authentication is not enabled, please complete Google SSO + configuration. + Configure Google SSO + {/if} + {/if} + {#if step === GoogleDatasouceConfigStep.SET_URL} + + Add the URL of the sheet you want to connect - - {:else if isGoogleConfigured === false} - Google authentication is not enabled, please complete Google SSO - configuration. - Configure Google SSO {/if} diff --git a/packages/builder/src/pages/builder/app/[application]/data/new.svelte b/packages/builder/src/pages/builder/app/[application]/data/new.svelte index fedaf013da..ed2e7f360d 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/new.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/new.svelte @@ -17,6 +17,7 @@ import IntegrationIcon from "components/backend/DatasourceNavigator/IntegrationIcon.svelte" import ICONS from "components/backend/DatasourceNavigator/icons/index.js" import FontAwesomeIcon from "components/common/FontAwesomeIcon.svelte" + import { onMount } from "svelte" let internalTableModal let externalDatasourceModal @@ -24,6 +25,7 @@ let integration = null let disabled = false let promptUpload = false + let continueGoogleSetup $: hasData = $datasources.list.length > 1 || $tables.list.length > 1 $: hasDefaultData = @@ -135,15 +137,29 @@ } $: fetchIntegrations() + + onMount(() => { + const urlParams = new URLSearchParams(window.location.search) + const action = urlParams.get("action") + if (action === "google_continue") { + continueGoogleSetup = true + externalDatasourceModal.show() + } + }) - - {#if integration?.auth?.type === "google"} - + { + continueGoogleSetup = false + }} +> + {#if integration?.auth?.type === "google" || continueGoogleSetup} + {:else} {/if}