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:
parent
4db78b7176
commit
7c4ec7bb9d
1 changed files with 2 additions and 0 deletions
|
|
@ -126,6 +126,8 @@ export default function OnboardingPage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.complete) {
|
if (result.complete) {
|
||||||
|
// Refresh JWT cookie with updated org data before navigating
|
||||||
|
await fetch("/api/auth/session");
|
||||||
window.location.href = "/";
|
window.location.href = "/";
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue