Skip to content

Redirect new user to org invitation page when singing up from an invitation link/email

Warren Gifford requested to merge mv/fix-signup-redirect into main

Created by: miveronese

Ticket: Cloud-349

This PR fixes a bug in which the user was redirected to the wrong flow after signing up from an email invitation link when enablePostSignupFlow is true. Now, the user is redirected to the OrgInvitationPage after signing up from an email invite

Test plan

The following setup is required for manually testing this:

  • SOURCEGRAPHDOTCOM_MODE = true in the config file.
  • feature flag “open-beta-enabled” set to true with an override on the user that sends the invitation
  • feature flags “org-email-invites” and “org-code” set to true with overrides on the org to which the new user will be invited to
  • "organizationInvitations" > "signingKey" added to dev-private/enterprise/dev/site-config.json
  • experimental feature flag enablePostSignupFlow set to true

Steps (see video):

  • Invite a new user to an org that has "org-email-invites" enabled
  • In a private window or different browser, click the link to accept the invite (you can also copy the link from the Pending Invites page)
  • Click the SignUp link.
  • After signing up, you should be redirected to the OrgInvitationPage

https://user-images.githubusercontent.com/1552863/162104812-0b159155-c1b5-49d4-b8ef-c74bf4a0eed4.mov

App preview:

Merge request reports

Loading