From 289c7fba99faf36f418f6fcd74f975dc7dfa9f7b Mon Sep 17 00:00:00 2001 From: Drew Rothstein Date: Wed, 16 Jul 2025 08:00:55 -0400 Subject: [PATCH] [bug] onboarding: fix infinite loop when using GCP IAP --- CHANGELOG.md | 4 ++++ packages/web/src/app/[domain]/layout.tsx | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4c3d44c6..436809beb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +- Fixed onboarding infinite loop when GCP IAP Auth is enabled. [#381](https://github.com/sourcebot-dev/sourcebot/pull/381) + ## [4.5.1] - 2025-07-14 ### Changed diff --git a/packages/web/src/app/[domain]/layout.tsx b/packages/web/src/app/[domain]/layout.tsx index f24accd3b..dfda4b321 100644 --- a/packages/web/src/app/[domain]/layout.tsx +++ b/packages/web/src/app/[domain]/layout.tsx @@ -95,7 +95,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}