Fix workspace-setup redirect loop after org creation
The JWT callback was optimized to only query the DB on sign-in or explicit session update, but the middleware reads the JWT cookie which was stale after org changes. Reverted to always refreshing org data in the JWT callback (matching original behavior). Also switched workspace- setup and onboarding completion to hard navigation to guarantee the middleware re-evaluates with the latest JWT cookie. Made-with: Cursor
This commit is contained in:
parent
bf92126cf5
commit
4db78b7176
1 changed files with 1 additions and 2 deletions
|
|
@ -126,8 +126,7 @@ export default function OnboardingPage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.complete) {
|
if (result.complete) {
|
||||||
await fetch("/api/auth/session");
|
window.location.href = "/";
|
||||||
router.replace("/");
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue