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
This commit is contained in:
Randall Stillwell 2026-04-16 19:12:21 -05:00
parent 4db78b7176
commit 7c4ec7bb9d

View file

@ -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;
}