From ac03bdcc5a4509f97cfa7b37eb122da7f3a3fb55 Mon Sep 17 00:00:00 2001 From: Igor Zalutski Date: Fri, 13 Sep 2024 15:58:05 +0100 Subject: [PATCH] Force refresh session at the end of onboarding --- .../(authenticated-pages)/onboarding/OnboardingFlow.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/(dynamic-pages)/(authenticated-pages)/onboarding/OnboardingFlow.tsx b/src/app/(dynamic-pages)/(authenticated-pages)/onboarding/OnboardingFlow.tsx index 4df7f66c..4276be33 100644 --- a/src/app/(dynamic-pages)/(authenticated-pages)/onboarding/OnboardingFlow.tsx +++ b/src/app/(dynamic-pages)/(authenticated-pages)/onboarding/OnboardingFlow.tsx @@ -10,6 +10,7 @@ import { OrganizationCreation } from "./OrganizationCreation"; import { ProfileUpdate } from "./ProfileUpdate"; import { TermsAcceptance } from "./TermsAcceptance"; +import { refreshSessionAction } from "@/data/user/session"; import type { Table } from "@/types"; import type { AuthUserMetadata } from "@/utils/zod-schemas/authUserMetadata"; @@ -48,7 +49,7 @@ export function UserOnboardingFlow({ console.log('currentStep is COMPLETE', currentStep); console.log('onboardingStatus : ', onboardingStatus); console.log('now redirecting to /dashboard'); - router.push("/dashboard"); + refreshSessionAction().then(() => { router.push("/dashboard"); }); } }, [currentStep, router, onboardingStatus]);