From 7c4ec7bb9dbf697a1994ce78dfc373de57027a19 Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Thu, 16 Apr 2026 19:12:21 -0500 Subject: [PATCH] Refresh JWT before hard navigation on onboarding completion After completing onboarding, the JWT cookie still has stale org data. Fetching /api/auth/session triggers the JWT callback to query the DB and write the updated cookie before the hard navigate to /. Made-with: Cursor --- src/app/(dashboard)/onboarding/page.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/(dashboard)/onboarding/page.tsx b/src/app/(dashboard)/onboarding/page.tsx index 4f75881..5873144 100644 --- a/src/app/(dashboard)/onboarding/page.tsx +++ b/src/app/(dashboard)/onboarding/page.tsx @@ -126,6 +126,8 @@ export default function OnboardingPage() { } if (result.complete) { + // Refresh JWT cookie with updated org data before navigating + await fetch("/api/auth/session"); window.location.href = "/"; return result; }