Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move onboardingStatus computation from frontend to backend #5095

Closed
martmull opened this issue Apr 22, 2024 · 2 comments · Fixed by #5954
Closed

Move onboardingStatus computation from frontend to backend #5095

martmull opened this issue Apr 22, 2024 · 2 comments · Fixed by #5954
Assignees

Comments

@martmull
Copy link
Contributor

martmull commented Apr 22, 2024

Scope & Context

The application shows has not relevant redirections when creating a workspace, joining a workspace, etc. To sanitize behavior, we want the onboardingStatus to be computed in the backend, not in the frontEnd

Current behavior

  • when creating a new account via an invitation link, when logging with google, we redirect to /create/workspace then /create/profile. /create/workspace is unecessary
  • When sign in (account creation) with a google auth, there is a unecessary redirection to /create/workspace
  • When sign up (account creation) with a google auth, there is a unecessary redirection to /create/profile
  • Check other use cases, with IS_BILLING_ENABLED = true or false

Expected behavior

No more flashs, unexpected or unnecessary redirections

Technical inputs

  • Move the logic in packages/twenty-front/src/modules/auth/utils/getOnboardingStatus.ts to the backend in userEntity with a onboardingStatus computed field.
  • Use the front logic to compute the onboardingStatus field
  • Get onboardingStatus value in get_current_user request and use it in the front
  • Fix unecessary redirections
@martmull martmull self-assigned this Apr 22, 2024
@charlesBochet
Copy link
Member

Side Goal: remove blank transition screen (caused by react rendering / effects)

@charlesBochet
Copy link
Member

To be discussed if we can have activationStatus decoupled from onboarding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants
@charlesBochet @martmull and others