diff --git a/app/auth-portal/src/pages/ProfilePage.vue b/app/auth-portal/src/pages/ProfilePage.vue index a2c83dd35e..0429bdb472 100644 --- a/app/auth-portal/src/pages/ProfilePage.vue +++ b/app/auth-portal/src/pages/ProfilePage.vue @@ -229,12 +229,17 @@ const saveHandler = async () => { const completeProfileReq = await authStore.COMPLETE_PROFILE({}); if (completeProfileReq.result.success) { - if (authStore.user?.emailVerified) { - tracker.trackEvent("workspace_launcher_widget_click"); - window.location.href = `${API_HTTP_URL}/workspaces/${workspacesStore.defaultWorkspace.id}/go`; + if (featureFlagsStore.SIMPLIFIED_SIGNUP) { + if (authStore.user?.emailVerified) { + tracker.trackEvent("workspace_launcher_widget_click"); + window.location.href = `${API_HTTP_URL}/workspaces/${workspacesStore.defaultWorkspace.id}/go`; + } else { + // eslint-disable-next-line @typescript-eslint/no-floating-promises + router.push({ name: "login-success" }); + } } else { // eslint-disable-next-line @typescript-eslint/no-floating-promises - router.push({ name: "login-success" }); + router.push({ name: "workspaces" }); } } } else { diff --git a/app/auth-portal/src/store/feature_flags.store.ts b/app/auth-portal/src/store/feature_flags.store.ts index 2419ce50b9..f1b6cd76f7 100644 --- a/app/auth-portal/src/store/feature_flags.store.ts +++ b/app/auth-portal/src/store/feature_flags.store.ts @@ -11,6 +11,7 @@ export const useFeatureFlagsStore = () => { CREATE_WORKSPACES: false, EDIT_WORKSPACES: false, DELETE_WORKSPACE: false, + SIMPLIFIED_SIGNUP: false, }), onActivated() { posthog.onFeatureFlags((flags) => { @@ -18,6 +19,7 @@ export const useFeatureFlagsStore = () => { this.CREATE_WORKSPACES = flags.includes("create_workspaces"); // If you can create workspaces, editing workspaces will also be enabled. this.DELETE_WORKSPACE = flags.includes("delete_workspace"); + this.SIMPLIFIED_SIGNUP = flags.includes("simplified_signup_flow"); this.EDIT_WORKSPACES = flags.includes("edit_workspaces") || this.CREATE_WORKSPACES; });