diff --git a/web/core/components/account/auth-forms/auth-root.tsx b/web/core/components/account/auth-forms/auth-root.tsx index 9c89d488f..4f3bde94b 100644 --- a/web/core/components/account/auth-forms/auth-root.tsx +++ b/web/core/components/account/auth-forms/auth-root.tsx @@ -41,6 +41,7 @@ export const AuthRoot: FC = observer((props) => { const invitation_id = searchParams.get("invitation_id"); const workspaceSlug = searchParams.get("slug"); const error_code = searchParams.get("error_code"); + const nextPath = searchParams.get("next_path"); // props const { authMode: currentAuthMode } = props; // states @@ -172,6 +173,7 @@ export const AuthRoot: FC = observer((props) => { email={email} handleEmailClear={handleEmailClear} generateEmailUniqueCode={generateEmailUniqueCode} + nextPath={nextPath || undefined} /> )} {authStep === EAuthSteps.PASSWORD && ( @@ -184,6 +186,7 @@ export const AuthRoot: FC = observer((props) => { if (step === EAuthSteps.UNIQUE_CODE) generateEmailUniqueCode(email); setAuthStep(step); }} + nextPath={nextPath || undefined} /> )} diff --git a/web/core/components/account/auth-forms/password.tsx b/web/core/components/account/auth-forms/password.tsx index cc8595a4c..6437688e0 100644 --- a/web/core/components/account/auth-forms/password.tsx +++ b/web/core/components/account/auth-forms/password.tsx @@ -26,6 +26,7 @@ type Props = { mode: EAuthModes; handleEmailClear: () => void; handleAuthStep: (step: EAuthSteps) => void; + nextPath: string | undefined; }; type TPasswordFormValues = { @@ -42,7 +43,7 @@ const defaultValues: TPasswordFormValues = { const authService = new AuthService(); export const AuthPasswordForm: React.FC = observer((props: Props) => { - const { email, isSMTPConfigured, handleAuthStep, handleEmailClear, mode } = props; + const { email, isSMTPConfigured, handleAuthStep, handleEmailClear, mode, nextPath } = props; // hooks const { captureEvent } = useEventTracker(); // states @@ -120,6 +121,7 @@ export const AuthPasswordForm: React.FC = observer((props: Props) => { > + {nextPath && }