Question Related to Onboarding and UserVars
Hi everyone, I hope you're all doing well!
I’d like to better understand how the onboarding flow and userVars work. In the sign up or activate workspace flow, is there any point where the onboardingStatus is set to ProfileCreation? Locally, the "Create Profile" screen doesn't appear, and after setting the displayName, we go straight into the workspace, while in the Demo version this screen is displayed. Is there a specific environment variable for this?
Thank you for your attention!
4 Replies
cc @charles you have more context on this feature
@martmull could you have a look too 🙏
yes
In a nutshell, ProfileCreation screen appears if the workspaceMember
firstName
and lastName
are empty
Detailed version:
onboardingStatus
is set to Profile creation if the userVar ONBOARDING_CREATE_PROFILE_PENDING
is set to true. This is done in 3 different location on the backend side (you can look for setOnboardingCreateProfilePending
calls):
- on signInUp if firstName
and lastName
are empty for workspaceCreation and signUp
- on WorkspaceWorkspaceMemberListener.handleUpdateEvent
if a workspaceMember is modified and its firstName
and lastName
are empty
Locally, [email protected] is seeded with firstName and lastName non empty (Tim Cook), so ONBOARDING_CREATE_PROFILE_PENDING
is not set to true
In demo, when you create a new account, firstName and lastName are initiated empty, so ONBOARDING_CREATE_PROFILE_PENDING
is set to true
You will notice that if you create an account with google, the Create Profile screen is not displayed either, because we get firstName and lastName from the google account
Hope it helpsHello! Sorry for the delayed response. Thank you for your attention. I searched the code for "setOnboardingCreateProfilePending" but couldn’t find anything, only this getOnboardingStatus in the onboarding.service. I also noticed that the members of a new workspace are being saved with empty firstName and lastName, but it still skips the create profile step. Could this be something related to userVars?
- Here you can find an occurence of
setOnboardingCreateProfilePending
in the code https://github.com/twentyhq/twenty/blob/ec0250616ed01fee34ff9700eec6d36949f46b88/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts#L281
- Can you detail the steps you go through to see skipped create profile step for new members? I did not see any issue when I tried the following steps (on main):
- create a workspace
- copy the invitation link from /settings/workspace-members
- logout, access the invitation link and signin with a new email address
- see the create profile stepGitHub
twenty/packages/twenty-server/src/engine/core-modules/auth/services...
Building a modern alternative to Salesforce, powered by the community. - twentyhq/twenty