diff --git a/packages/builder/src/components/backend/DatasourceNavigator/_components/GoogleButton.svelte b/packages/builder/src/components/backend/DatasourceNavigator/_components/GoogleButton.svelte
index 0cf92dde2b..b7d70d88b7 100644
--- a/packages/builder/src/components/backend/DatasourceNavigator/_components/GoogleButton.svelte
+++ b/packages/builder/src/components/backend/DatasourceNavigator/_components/GoogleButton.svelte
@@ -6,6 +6,7 @@
export let preAuthStep
export let datasource
export let disabled
+ export let samePage
$: tenantId = $auth.tenantId
@@ -25,10 +26,12 @@
ds = resp
}
}
- window.open(
- `/api/global/auth/${tenantId}/datasource/google?datasourceId=${ds._id}&appId=${appId}`,
- "_blank"
- )
+ const url = `/api/global/auth/${tenantId}/datasource/google?datasourceId=${ds._id}&appId=${appId}`
+ if (samePage) {
+ window.location = url
+ } else {
+ window.open(url, "_blank")
+ }
}}
>
diff --git a/packages/builder/src/pages/builder/portal/apps/onboarding/_components/DatasourceConfigPanel.svelte b/packages/builder/src/pages/builder/portal/apps/onboarding/_components/DatasourceConfigPanel.svelte
index 333cfdb0c6..2b44648279 100644
--- a/packages/builder/src/pages/builder/portal/apps/onboarding/_components/DatasourceConfigPanel.svelte
+++ b/packages/builder/src/pages/builder/portal/apps/onboarding/_components/DatasourceConfigPanel.svelte
@@ -107,7 +107,7 @@
{#if isGoogle}
-
+
{:else}
{/if}