From 4e3440638675e05598f8c83985073055d5ab1067 Mon Sep 17 00:00:00 2001 From: drew-u410 <77423219+drew-u410@users.noreply.github.com> Date: Fri, 25 Jul 2025 15:03:50 -0400 Subject: [PATCH] [bug] onboarding: fix infinite loop when using GCP IAP (#381) Co-authored-by: Michael Sukkarieh --- CHANGELOG.md | 3 +++ packages/web/src/app/[domain]/layout.tsx | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9dc3522..8ce4eeea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- Fixed onboarding infinite loop when GCP IAP Auth is enabled. [#381](https://github.com/sourcebot-dev/sourcebot/pull/381) + ### Added - Introducing Ask Sourcebot - ask natural langauge about your codebase. Get back comprehensive Markdown responses with inline citations back to the code. Bring your own LLM api key. [#392](https://github.com/sourcebot-dev/sourcebot/pull/392) diff --git a/packages/web/src/app/[domain]/layout.tsx b/packages/web/src/app/[domain]/layout.tsx index 6a3e34da..bca73f77 100644 --- a/packages/web/src/app/[domain]/layout.tsx +++ b/packages/web/src/app/[domain]/layout.tsx @@ -94,7 +94,8 @@ export default async function Layout({ } } - if (!org.isOnboarded) { + // If the org is not onboarded, and GCP IAP is not enabled, show the onboarding page + if (!org.isOnboarded && !(env.AUTH_EE_GCP_IAP_ENABLED && env.AUTH_EE_GCP_IAP_AUDIENCE)) { return ( {children}